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

# SHOW CONSTRAINTS

This view has a row for every constraint in every table in the database, except for `NULL` constraints. Those are presented as the column `IS_NULLABLE` at `SHOW COLUMNS` view.

The output is ordered by the `table_name` column.

Data can be filtered with `IN TABLE` table\_name syntax.

The following table lists the output’s columns:

| Column name      | Data type      | Description                                                                                                    |
| :--------------- | :------------- | :------------------------------------------------------------------------------------------------------------- |
| TABLE\_NAME      | `VARCHAR(127)` | The table name. This is the filter column.                                                                     |
| COLUMN\_NAME     | `VARCHAR(127)` | The column the constraint is set on                                                                            |
| CONSTRAINT\_TYPE | `CHAR(1)`      | `r` = foreign key constraint, `p` = primary key constraint, `u` = unique constraint                            |
| REF\_TABLE\_NAME | `VARCHAR(127)` | For foreign key constraint: The referenced table the foreign key is pointing to. Otherwise null.               |
| REF\_COL\_NAME   | `VARCHAR(127)` | For foreign key constraint: The column in the reference table the foreign key is referring to. Otherwise null. |
