PROCEDURE_COLUMNS Rowset

The PROCEDURE_COLUMNS rowset returns information about the columns of rowsets returned by procedures.

The PROCEDURE_COLUMNS rowset contains the following columns.

Column name Type indicator Description
PROCEDURE_CATALOG DBTYPE_WSTR Catalog name. NULL if the provider does not support catalogs.
PROCEDURE_SCHEMA DBTYPE_WSTR Unqualified schema name. NULL if the provider does not support schemas.
PROCEDURE_NAME DBTYPE_WSTR Table name.
COLUMN_NAME DBTYPE_WSTR The name of the column; this might not be unique. If this cannot be determined, a NULL is returned.

This column, together with the COLUMN_GUID and COLUMN_PROPID columns, forms the column ID. One or more of these columns will be NULL depending on which elements of the DBID structure the provider uses.

COLUMN_GUID DBTYPE_GUID Column GUID.
COLUMN_PROPID DBTYPE_UI4 Column property ID.
ROWSET_NUMBER DBTYPE_UI4 Number of the rowset containing the column. This is greater than one only if the procedure returns multiple rowsets.
ORDINAL_POSITION DBTYPE_UI4 The ordinal of the column. Columns are numbered starting from one. NULL if there is no stable ordinal value for the column.
IS_NULLABLE DBTYPE_BOOL VARIANT_TRUE—The column might be nullable.

VARIANT_FALSE—The column is known not to be nullable.

DATA_TYPE DBTYPE_UI2 The indicator of the column's data type. If the data type of the column varies from row to row, this must be DBTYPE_VARIANT. For a list of valid type indicators, see "Type Indicators" in Appendix A.
TYPE_GUID DBTYPE_GUID The GUID of the column's data type.
CHARACTER_MAXIMUM_
LENGTH
DBTYPE_UI4 The maximum possible length of a value in the column. For character, binary, or bit columns, this is one of the following:
  • The maximum length of the column in characters, bytes, or bits, respectively, if one is defined. For example, a CHAR(5) column in an SQL table has a maximum length of five (5).

  • The maximum length of the data type in characters, bytes, or bits, respectively, if the column does not have a defined length.

  • Zero (0) if neither the column nor the data type has a defined maximum length.

NULL for all other types of columns.

CHARACTER_OCTET_
LENGTH
DBTYPE_UI4 Maximum length in octets (bytes) of the column, if the type of the column is character or binary. A value of zero means the column has no maximum length. NULL for all other types of columns.
NUMERIC_PRECISION DBTYPE_UI2 If the column's data type is numeric, this is the maximum precision of the column. The precision of columns with a data type of DBTYPE_DECIMAL or DBTYPE_NUMERIC depends on the definition of the column. For the precision of all other numeric data types, see "Precision of Numeric Data Types" in Appendix A.

If the column's data type is not numeric, this is NULL.

NUMERIC_SCALE DBTYPE_I2 If the column's type indicator is DBTYPE_DECIMAL or DBTYPE_NUMERIC, this is the number of digits to the right of the decimal point. Otherwise, this is NULL.
DESCRIPTION DBTYPE_WSTR Human-readable description of the column. For example, the description for a column named Name in the Employee table might be "Employee name."

Default Sort Order: PROCEDURE_CATALOG, PROCEDURE_SCHEMA, PROCEDURE_NAME