title_wip

**Example**

Query:

```
SELECT table_catalog, 
       table_schema, 
       table_name, 
       table_type, 
       table_collation, 
       table_comment
FROM INFORMATION_SCHEMA.TABLES
WHERE (table_schema = currentDatabase() OR table_schema = '')
  AND table_name NOT LIKE '%inner%'
LIMIT 1 
FORMAT Vertical;
```

Result:

```
Row 1:
──────
table_catalog:   default
table_schema:    default
table_name:      describe_example
table_type:      BASE TABLE
table_collation: utf8mb4_0900_ai_ci
table_comment:
```

## VIEWS[​](#views "Direct link to VIEWS")

Contains columns read from the [system.tables](/docs/operations/system-tables/tables) system table, when the table engine [View](/docs/engines/table-engines/special/view) is used.

Columns:

- `table_catalog` ([String](/docs/sql-reference/data-types/string)) — The name of the database in which the table is located.
- `table_schema` ([String](/docs/sql-reference/data-types/string)) — The name of the database in which the table is located.
- `table_name` ([String](/docs/sql-reference/data-types/string)) — Table name.
- `view_definition` ([String](/docs/sql-reference/data-types/string)) — `SELECT` query for view.
- `check_option` ([String](/docs/sql-reference/data-types/string)) — `NONE`, no checking.
- `is_updatable` ([Enum8](/docs/sql-reference/data-types/enum)) — `NO`, the view is not updated.
- `is_insertable_into` ([Enum8](/docs/sql-reference/data-types/enum)) — Shows whether the created view is [materialized](/docs/sql-reference/statements/create/view#materialized-view). Possible values:
  - `NO` — The created view is not materialized.
  - `YES` — The created view is materialized.
- `is_trigger_updatable` ([Enum8](/docs/sql-reference/data-types/enum)) — `NO`, the trigger is not updated.
- `is_trigger_deletable` ([Enum8](/docs/sql-reference/data-types/enum)) — `NO`, the trigger is not deleted.
- `is_trigger_insertable_into` ([Enum8](/docs/sql-reference/data-types/enum)) — `NO`, no data is inserted into the trigger.

**Example**

Query:

```
CREATE VIEW v (n Nullable(Int32), f Float64) AS SELECT n, f FROM t;
CREATE MATERIALIZED VIEW mv ENGINE = Null AS SELECT * FROM system.one;
SELECT table_catalog,
       table_schema,
       table_name,
       view_definition,
       check_option,
       is_updatable,
       is_insertable_into,
       is_trigger_updatable,
       is_trigger_deletable,
       is_trigger_insertable_into
FROM information_schema.views
WHERE table_schema = currentDatabase() 
LIMIT 1
FORMAT Vertical;
```

Result:

```
Row 1:
──────
table_catalog:              default
table_schema:               default
table_name:                 mv
view_definition:            SELECT * FROM system.one
check_option:               NONE
is_updatable:               NO
is_insertable_into:         YES
is_trigger_updatable:       NO
is_trigger_deletable:       NO
is_trigger_insertable_into: NO
```

## KEY\_COLUMN\_USAGE[​](#key_column_usage "Direct link to KEY_COLUMN_USAGE")

Contains columns from the [system.tables](/docs/operations/system-tables/tables) system table which are restricted by constraints.

Columns:

- `constraint_catalog` ([String](/docs/sql-reference/data-types/string)) — Currently unused. Always `def`.
- `constraint_schema` ([String](/docs/sql-reference/data-types/string)) — The name of the schema (database) to which the constraint belongs.
- `constraint_name` ([Nullable](/docs/sql-reference/data-types/nullable)([String](/docs/sql-reference/data-types/string))) — The name of the constraint.
- `table_catalog` ([String](/docs/sql-reference/data-types/string)) — Currently unused. Always `def`.
- `table_schema` ([String](/docs/sql-reference/data-types/string)) — The name of the schema (database) to which the table belongs.
- `table_name` ([String](/docs/sql-reference/data-types/string)) — The name of the table that has the constraint.
- `column_name` ([Nullable](/docs/sql-reference/data-types/nullable)([String](/docs/sql-reference/data-types/string))) — The name of the column that has the constraint.
- `ordinal_position` ([UInt32](/docs/sql-reference/data-types/int-uint)) — Currently unused. Always `1`.
- `position_in_unique_constraint` ([Nullable](/docs/sql-reference/data-types/nullable)([UInt32](/docs/sql-reference/data-types/int-uint))) — Currently unused. Always `NULL`.
- `referenced_table_schema` ([Nullable](/docs/sql-reference/data-types/nullable)([String](/docs/sql-reference/data-types/string))) — Currently unused. Always NULL.
- `referenced_table_name` ([Nullable](/docs/sql-reference/data-types/nullable)([String](/docs/sql-reference/data-types/string))) — Currently unused. Always NULL.
- `referenced_column_name` ([Nullable](/docs/sql-reference/data-types/nullable)([String](/docs/sql-reference/data-types/string))) — Currently unused. Always NULL.

**Example**

```
CREATE TABLE test (i UInt32, s String) ENGINE MergeTree ORDER BY i;
SELECT constraint_catalog,
       constraint_schema,
       constraint_name,
       table_catalog,
       table_schema,
       table_name,
       column_name,
       ordinal_position,
       position_in_unique_constraint,
       referenced_table_schema,
       referenced_table_name,
       referenced_column_name
FROM information_schema.key_column_usage 
WHERE table_name = 'test' 
FORMAT Vertical;
```

Result:

```
Row 1:
──────
constraint_catalog:            def
constraint_schema:             default
constraint_name:               PRIMARY
table_catalog:                 def
table_schema:                  default
table_name:                    test
column_name:                   i
ordinal_position:              1
position_in_unique_constraint: ᴺᵁᴸᴸ
referenced_table_schema:       ᴺᵁᴸᴸ
referenced_table_name:         ᴺᵁᴸᴸ
referenced_column_name:        ᴺᵁᴸᴸ
```

## REFERENTIAL\_CONSTRAINTS[​](#referential_constraints "Direct link to REFERENTIAL_CONSTRAINTS")

Contains information about foreign keys. Currently returns an empty result (no rows) which is just enough to provide compatibility with 3rd party tools like Tableau Online.

Columns:

- `constraint_catalog` ([String](/docs/sql-reference/data-types/string)) — Currently unused.
- `constraint_schema` ([String](/docs/sql-reference/data-types/string)) — Currently unused.
- `constraint_name` ([Nullable](/docs/sql-reference/data-types/nullable)([String](/docs/sql-reference/data-types/string))) — Currently unused.
- `unique_constraint_catalog` ([String](/docs/sql-reference/data-types/string)) — Currently unused.
- `unique_constraint_schema` ([String](/docs/sql-reference/data-types/string)) — Currently unused.
- `unique_constraint_name` ([Nullable](/docs/sql-reference/data-types/nullable)([String](/docs/sql-reference/data-types/string))) — Currently unused.
- `match_option` ([String](/docs/sql-reference/data-types/string)) — Currently unused.
- `update_rule` ([String](/docs/sql-reference/data-types/string)) — Currently unused.
- `delete_rule` ([String](/docs/sql-reference/data-types/string)) — Currently unused.
- `table_name` ([String](/docs/sql-reference/data-types/string)) — Currently unused.
- `referenced_table_name` ([String](/docs/sql-reference/data-types/string)) — Currently unused.

## STATISTICS[​](#statistics "Direct link to STATISTICS")

Provides information about table indexes. Currently returns an empty result (no rows) which is just enough to provide compatibility with 3rd party tools like Tableau Online.

Columns: