|
Column name
|
Column number
|
Data type
|
Comments
|
|---|
|
PROCEDURE_CAT (ODBC 2.0)
|
1
|
Varchar
|
Procedure catalog name; NULL if not applicable to the data source. If a driver supports catalogs for some procedures but not for others, such as when the driver retrieves data from different DBMSs, it returns an empty string ("") for those procedures that do not have catalogs.
|
|
PROCEDURE_SCHEM (ODBC 2.0)
|
2
|
Varchar
|
Procedure schema name; NULL if not applicable to the data source. If a driver supports schemas for some procedures but not for others, such as when the driver retrieves data from different DBMSs, it returns an empty string ("") for those procedures that do not have schemas.
|
|
PROCEDURE_NAME (ODBC 2.0)
|
3
|
Varchar not NULL
|
Procedure name. An empty string is returned for a procedure that does not have a name.
|
|
COLUMN_NAME (ODBC 2.0)
|
4
|
Varchar not NULL
|
Procedure column name. The driver returns an empty string for a procedure column that does not have a name.
|
|
COLUMN_TYPE (ODBC 2.0)
|
5
|
Smallint not NULL
|
Defines the procedure column as a parameter or a result set column:
SQL_PARAM_TYPE_UNKNOWN: The procedure column is a parameter whose type is unknown. (ODBC 1.0)
SQL_PARAM_INPUT: The procedure column is an input parameter. (ODBC 1.0)
SQL_PARAM_INPUT_OUTPUT: The procedure column is an input/output parameter. (ODBC 1.0)
SQL_PARAM_OUTPUT: The procedure column is an output parameter. (ODBC 2.0)
SQL_RETURN_VALUE: The procedure column is the return value of the procedure. (ODBC 2.0)
SQL_RESULT_COL: The procedure column is a result set column. (ODBC 1.0)
|
|
DATA_TYPE (ODBC 2.0)
|
6
|
Smallint not NULL
|
SQL data type. This can be an ODBC SQL data type or a driver-specific SQL data type. For datetime and interval data types, this column returns the concise data types (for example, SQL_TYPE_TIME or SQL_INTERVAL_YEAR_TO_MONTH). For a list of valid ODBC SQL data types, see SQL Data Types in Appendix D: Data Types. For information about driver-specific SQL data types, see the driver's documentation.
|
|
TYPE_NAME (ODBC 2.0)
|
7
|
Varchar not NULL
|
Data source–dependent data type name; for example, "CHAR", "VARCHAR", "MONEY", "LONG VARBINARY", or "CHAR ( ) FOR BIT DATA".
|
|
COLUMN_SIZE (ODBC 2.0)
|
8
|
Integer
|
The column size of the procedure column on the data source. NULL is returned for data types where column size is not applicable. For more information concerning precision, see Column Size, Decimal Digits, Transfer Octet Length, and Display Size in Appendix D: Data Types.
|
|
BUFFER_LENGTH (ODBC 2.0)
|
9
|
Integer
|
The length in bytes of data transferred on an SQLGetData or SQLFetch operation if SQL_C_DEFAULT is specified. For numeric data, this size may be different than the size of the data stored on the data source. For more information, see Column Size, Decimal Digits, Transfer Octet Length, and Display Size, in Appendix D: Data Types.
|
|
DECIMAL_DIGITS (ODBC 2.0)
|
10
|
Smallint
|
The decimal digits of the procedure column on the data source. NULL is returned for data types where decimal digits is not applicable. For more information concerning decimal digits, see Column Size, Decimal Digits, Transfer Octet Length, and Display Size, in Appendix D: Data Types.
|
|
NUM_PREC_RADIX (ODBC 2.0)
|
11
|
Smallint
|
For numeric data types, either 10 or 2.
If 10, the values in COLUMN_SIZE and DECIMAL_DIGITS give the number of decimal digits allowed for the column. For example, a DECIMAL(12,5) column would return a NUM_PREC_RADIX of 10, a COLUMN_SIZE of 12, and a DECIMAL_DIGITS of 5; a FLOAT column could return a NUM_PREC_RADIX of 10, a COLUMN_SIZE of 15, and a DECIMAL_DIGITS of NULL.
If 2, the values in COLUMN_SIZE and DECIMAL_DIGITS give the number of bits allowed in the column. For example, a FLOAT column could return a NUM_PREC_RADIX of 2, a COLUMN_SIZE of 53, and a DECIMAL_DIGITS of NULL.
NULL is returned for data types where NUM_PREC_RADIX is not applicable.
|
|
NULLABLE (ODBC 2.0)
|
12
|
Smallint not NULL
|
Whether the procedure column accepts a NULL value:
SQL_NO_NULLS: The procedure column does not accept NULL values.
SQL_NULLABLE: The procedure column accepts NULL values.
SQL_NULLABLE_UNKNOWN: It is not known if the procedure column accepts NULL values.
|
|
REMARKS (ODBC 2.0)
|
13
|
Varchar
|
A description of the procedure column.
|
|
COLUMN_DEF (ODBC 3.0)
|
14
|
Varchar
|
The default value of the column.
If NULL was specified as the default value, this column is the word NULL, not enclosed in quotation marks. If the default value cannot be represented without truncation, this column contains TRUNCATED, with no enclosing single quotation marks. If no default value was specified, this column is NULL.
The value of COLUMN_DEF can be used in generating a new column definition, except when it contains the value TRUNCATED.
|
|
SQL_DATA_TYPE (ODBC 3.0)
|
15
|
Smallint not NULL
|
The value of the SQL data type as it appears in the SQL_DESC_TYPE field of the descriptor. This column is the same as the DATA_TYPE column, except for datetime and interval data types.
For datetime and interval data types, the SQL_DATA_TYPE field in the result set will return SQL_INTERVAL or SQL_DATETIME, and the SQL_DATETIME_SUB field will return the subcode for the specific interval or datetime data type. (See Appendix D: Data Types.)
|
|
SQL_DATETIME_SUB (ODBC 3.0)
|
16
|
Smallint
|
The subtype code for datetime and interval data types. For other data types, this column returns a NULL.
|
|
CHAR_OCTET_LENGTH (ODBC 3.0)
|
17
|
Integer
|
The maximum length in bytes of a character or binary data type column. For all other data types, this column returns a NULL.
|
|
ORDINAL_POSITION (ODBC 3.0)
|
18
|
Integer not NULL
|
For input and output parameters, the ordinal position of the parameter in the procedure definition (in increasing parameter order, starting at 1). For a return value (if any), 0 is returned. For result-set columns, the ordinal position of the column in the result set, with the first column in the result set being number 1. If there are multiple result sets, column ordinal positions are returned in a driver-specific manner.
|
|
IS_NULLABLE (ODBC 3.0)
|
19
|
Varchar
|
"NO" if the column does not include NULLs.
"YES" if the column can include NULLs.
This column returns a zero-length string if nullability is unknown.
ISO rules are followed to determine nullability. An ISO SQL–compliant DBMS cannot return an empty string.
The value returned for this column is different from the value returned for the NULLABLE column. (See the description of the NULLABLE column.)
|