MDAC 2.5 SDK - OLE DB Programmer's Reference
Appendix B: Schema Rowsets


 

CONSTRAINT_COLUMN_USAGE Rowset

The CONSTRAINT_COLUMN_USAGE rowset identifies the columns used by referential constraints, unique constraints, check constraints, and assertions and that are defined in the catalog and owned by a given user.

The CONSTRAINT_COLUMN_USAGE rowset contains the following columns.

Column name Type indicator Description
TABLE_CATALOG DBTYPE_WSTR Catalog name in which the table is defined. NULL if the provider does not support catalogs.
TABLE_SCHEMA DBTYPE_WSTR Unqualified schema name in which the table is defined. NULL if the provider does not support schemas.
TABLE_NAME DBTYPE_WSTR Table name.
COLUMN_NAME DBTYPE_WSTR Column name. 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.
CONSTRAINT_CATALOG DBTYPE_WSTR Catalog name. NULL if the provider does not support catalogs.
CONSTRAINT_SCHEMA DBTYPE_WSTR Unqualified schema name. NULL if the provider does not support schemas.
CONSTRAINT_NAME DBTYPE_WSTR Constraint name.

Default Sort Order: TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME, COLUMN_GUID, COLUMN_PROPID, CONSTRAINT_CATALOG, CONSTRAINT_SCHEMA, CONSTRAINT_NAME