The PRIMARY_KEYS rowset identifies the primary key columns defined in the catalog by a given user. This schema rowset is built upon an SQL 92 schema view as a convenience to the non-SQL programmer. If supported, it must be synchronized with the related SQL 92 view (CONSTRAINT_COLUMN_USAGE).
The PRIMARY_KEYS 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 | Primary key 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_PROPID | DBTYPE_UI4 | Primary key column property ID. |
ORDINAL | DBTYPE_UI4 | The order of the column names (and GUIDs and property IDs) in the key. |
Default Sort Order: TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME.