> ## Documentation Index
> Fetch the complete documentation index at: /documents/llms.txt
> Use this file to discover all available pages before exploring further.

# key_column_usage

> Information schema placeholder view not implemented in the database.

**Note**

This view does not apply to the available features in the database.

`key_column_usage` identifies all columns that are restricted by some unique, primary key, or foreign key constraint.

The following fields are provided in `key_column_usage`:

| **Field** | **Description** |
| - | - |
| CONSTRAINT\_CATALOG | The name of the catalog to which the constraint belongs. This value is always `def`. |
| CONSTRAINT\_SCHEMA | The name of the database to which the constraint belongs. |
| CONSTRAINT\_NAME | The name of the constraint. |
| TABLE\_CATALOG | The name of the catalog to which the table belongs. This value is always `def`. |
| TABLE\_SCHEMA | The name of the database to which the table belongs. |
| TABLE\_NAME | The name of the table that has the constraint. |
| COLUMN\_NAME | The name of the column that has the constraint.If the constraint is a foreign key, then this is the column of the foreign key, not the column that the foreign key references. |
| ORDINAL\_POSITION | The column's position within the constraint, not the column's position within the table. Column positions are numbered beginning with 1. |
| POSITION\_IN\_UNIQUE\_CONSTRAINT | `NULL` for unique and primary-key constraints. For foreign-key constraints, this column is the ordinal position in key of the table that is being referenced. |
| REFERENCED\_TABLE\_SCHEMA | The name of the schema referenced by the constraint. |
| REFERENCED\_TABLE\_NAME | The name of the table referenced by the constraint. |
| REFERENCED\_COLUMN\_NAME | The name of the column referenced by the constraint. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.