Returns information about a stored procedure’s input and return parameters.
sp_sproc_columns procedure_name [, procedure_owner] [, procedure_qualifier] [, column_name]
is the name of the stored procedure. The use of wildcard characters in pattern matching is not supported.
is the owner of the stored procedure. The use of wildcard characters in pattern matching is not supported. If no owner is specified, sp_sproc_columns returns all columns.
is the name of the database. This can be either the current database or NULL.
is the name of the parameter about which you want information. If you do not supply a parameter name, sp_sproc_columns returns information about all input and return parameters for the stored procedure.
The results set for sp_sproc_columns is:
Column |
Datatype |
Description |
---|---|---|
procedure_qualifier |
varchar(30) |
|
procedure_owner |
varchar(30) |
|
procedure_name |
varchar(41) |
NOT NULL. |
column_name |
varchar(30) |
NOT NULL. |
column_type |
smallint |
|
data_type |
smallint |
The integer code for an ODBC datatype. If this datatype cannot be mapped to an ANSI/ISO type, the value is NULL. The native datatype name is returned in the type_name column. |
type_name |
char(30) |
The string representation of the datatype. This is the datatype name as presented by the underlying DBMS. |
precision |
int |
The number of significant digits. |
length |
int |
The length in bytes of the datatype. |
scale |
smallint |
The number of digits to the right of the decimal point. |
radix |
smallint |
Base for numeric types. |
nullable |
smallint |
The value 1 means this datatype can be created allowing null values; 0 means it cannot. |
remarks |
varchar(254) |
NULL. |
ss_data_type |
tinyint |
An Adaptive Server datatype. |
colid |
tinyint |
An Adaptive Server specific column appended to the result set. |
sp_sproc_columns reports the type_name as float, and data_type as 6 for parameters defined as double precision. The Adaptive Server double precision datatype is a float implementation supports the range of values as specified in the ODBC specifications.
Any user can execute sp_sproc_columns.