SQLPRIMARYKEYS
The SQLPRIMARYKEYS view contains one row for every primary constraint key on a table.
The following table describes the columns in the view:
Column Name | Data Type | Description |
---|---|---|
TABLE_CAT | VARCHAR(128) | Relational database name |
TABLE_SCHEM | VARCHAR(128) | Name of the schema containing the table with the primary key. |
TABLE_NAME | VARCHAR(128) | Name of the table with the primary key. |
COLUMN_NAME | VARCHAR(128) | Name of a primary key column. |
KEY_SEQ | SMALLINT | The position of the column within the key. |
PK_NAME | VARCHAR(128) | Name of the primary key constraint. |