sp_sproc_columns (version 6.5)

Returns column information for a single stored procedure in the current environment.

For additional syntax information for sp_sproc_columns, see the Microsoft SQL Server Transact-SQL Reference.

The ORDINAL_POSITION column replaces the COLID column of earlier releases. In addition, the following columns have been inserted after the REMARKS column and before the SS_DATA_TYPE column.

Column Datatype Description
COLUMN_DEF varchar(254) The default value of the column.
SQL_DATA_TYPE smallint The value of the SQL datatype as it appears in the TYPE field of the descriptor. This column is the same as the DATA_TYPE column, except for the datetime and ANSI interval datatypes. NOT NULL.
SQL_DATETIME_SUB smallint The datetime ANSI interval subcode if the the value of SQL_DATA_TYPE is SQL_DATETIME or SQL_INTERVAL. For datatypes other than datetime and ANSI interval, this field is NULL.
CHAR_OCTET_LENGTH int The maximum length in bytes of a character or binary datatype column. For all other datatypes, this column returns a NULL.
ORDINAL_POSITION int The ordinal position of the column in the table. The first column in the table is 1. NOT NULL.
IS_NULLABLE varchar(254) The nullability of the column in the table. ISO rules are followed to determine nullability. An ISO SQL-compliant DBMS cannot return an empty string.

Displays YESif the column can include NULLS and displays NO if the column cannot include NULLS.

This column returns a zero-length string if nullability is unknown.

The value returned for this column is different that the value returned for the NULLABLE column.


In addition, the return value for the PRECISION column is in base 10.