title_wip

[Edit this page](https://github.com/ClickHouse/ClickHouse/tree/master/docs/en/operations/system-tables/tables.md)

Contains metadata of each table that the server knows about.

[Detached](/docs/sql-reference/statements/detach) tables are not shown in `system.tables`.

[Temporary tables](/docs/sql-reference/statements/create/table#temporary-tables) are visible in the `system.tables` only in those session where they have been created. They are shown with the empty `database` field and with the `is_temporary` flag switched on.

Columns:

- `database` ([String](/docs/sql-reference/data-types/string)) — The name of the database the table is in.
- `name` ([String](/docs/sql-reference/data-types/string)) — Table name.
- `uuid` ([UUID](/docs/sql-reference/data-types/uuid)) — Table uuid (Atomic database).
- `engine` ([String](/docs/sql-reference/data-types/string)) — Table engine name (without parameters).
- `is_temporary` ([UInt8](/docs/sql-reference/data-types/int-uint)) - Flag that indicates whether the table is temporary.
- `data_paths` ([Array](/docs/sql-reference/data-types/array)([String](/docs/sql-reference/data-types/string))) - Paths to the table data in the file systems.
- `metadata_path` ([String](/docs/sql-reference/data-types/string)) - Path to the table metadata in the file system.
- `metadata_modification_time` ([DateTime](/docs/sql-reference/data-types/datetime)) - Time of latest modification of the table metadata.
- `metadata_version` ([Int32](/docs/sql-reference/data-types/int-uint)) - Metadata version for ReplicatedMergeTree table, 0 for non ReplicatedMergeTree table.
- `dependencies_database` ([Array](/docs/sql-reference/data-types/array)([String](/docs/sql-reference/data-types/string))) - Database dependencies.
- `dependencies_table` ([Array](/docs/sql-reference/data-types/array)([String](/docs/sql-reference/data-types/string))) - Table dependencies ([materialized views](/docs/sql-reference/statements/create/view#materialized-view) the current table).
- `create_table_query` ([String](/docs/sql-reference/data-types/string)) - The query that was used to create the table.
- `engine_full` ([String](/docs/sql-reference/data-types/string)) - Parameters of the table engine.
- `as_select` ([String](/docs/sql-reference/data-types/string)) - `SELECT` query for view.
- `parameterized_view_parameters` ([Array](/docs/sql-reference/data-types/array) of [Tuple](/docs/sql-reference/data-types/tuple)) — Parameters of parameterized view.
- `partition_key` ([String](/docs/sql-reference/data-types/string)) - The partition key expression specified in the table.
- `sorting_key` ([String](/docs/sql-reference/data-types/string)) - The sorting key expression specified in the table.
- `primary_key` ([String](/docs/sql-reference/data-types/string)) - The primary key expression specified in the table.
- `sampling_key` ([String](/docs/sql-reference/data-types/string)) - The sampling key expression specified in the table.
- `storage_policy` ([String](/docs/sql-reference/data-types/string)) - The storage policy:

  - [MergeTree](/docs/engines/table-engines/mergetree-family/mergetree#table_engine-mergetree-multiple-volumes)
  - [Distributed](/docs/engines/table-engines/special/distributed)
- `total_rows` ([Nullable](/docs/sql-reference/data-types/nullable)([UInt64](/docs/sql-reference/data-types/int-uint))) - Total number of rows, if it is possible to quickly determine exact number of rows in the table, otherwise `NULL` (including underlying `Buffer` table).
- `total_bytes` ([Nullable](/docs/sql-reference/data-types/nullable)([UInt64](/docs/sql-reference/data-types/int-uint))) - Total number of bytes (including indices and projections), if it is possible to quickly determine exact number of bytes for the table on storage, otherwise `NULL` (does not includes any underlying storage).

  - If the table stores data on disk, returns used space on disk (i.e. compressed).
  - If the table stores data in memory, returns approximated number of used bytes in memory.
- `total_bytes_uncompressed` ([Nullable](/docs/sql-reference/data-types/nullable)([UInt64](/docs/sql-reference/data-types/int-uint))) - Total number of uncompressed bytes (including indices and projections), if it's possible to quickly determine the exact number of bytes from the part checksums for the table on storage, otherwise `NULL` (does not take underlying storage (if any) into account).
- `lifetime_rows` ([Nullable](/docs/sql-reference/data-types/nullable)([UInt64](/docs/sql-reference/data-types/int-uint))) - Total number of rows INSERTed since server start (only for `Buffer` tables).
- `lifetime_bytes` ([Nullable](/docs/sql-reference/data-types/nullable)([UInt64](/docs/sql-reference/data-types/int-uint))) - Total number of bytes INSERTed since server start (only for `Buffer` tables).
- `comment` ([String](/docs/sql-reference/data-types/string)) - The comment for the table.
- `has_own_data` ([UInt8](/docs/sql-reference/data-types/int-uint)) — Flag that indicates whether the table itself stores some data on disk or only accesses some other source.
- `loading_dependencies_database` ([Array](/docs/sql-reference/data-types/array)([String](/docs/sql-reference/data-types/string))) - Database loading dependencies (list of objects which should be loaded before the current object).
- `loading_dependencies_table` ([Array](/docs/sql-reference/data-types/array)([String](/docs/sql-reference/data-types/string))) - Table loading dependencies (list of objects which should be loaded before the current object).
- `loading_dependent_database` ([Array](/docs/sql-reference/data-types/array)([String](/docs/sql-reference/data-types/string))) - Dependent loading database.
- `loading_dependent_table` ([Array](/docs/sql-reference/data-types/array)([String](/docs/sql-reference/data-types/string))) - Dependent loading table.

The `system.tables` table is used in `SHOW TABLES` query implementation.

**Example**

```
SELECT * FROM system.tables LIMIT 2 FORMAT Vertical;
```

```
Row 1:
──────
database:                   base
name:                       t1
uuid:                       81b1c20a-b7c6-4116-a2ce-7583fb6b6736
engine:                     MergeTree
is_temporary:               0
data_paths:                 ['/var/lib/clickhouse/store/81b/81b1c20a-b7c6-4116-a2ce-7583fb6b6736/']
metadata_path:              /var/lib/clickhouse/store/461/461cf698-fd0b-406d-8c01-5d8fd5748a91/t1.sql
metadata_modification_time: 2021-01-25 19:14:32
dependencies_database:      []
dependencies_table:         []
create_table_query:         CREATE TABLE base.t1 (`n` UInt64) ENGINE = MergeTree ORDER BY n
engine_full:                MergeTree ORDER BY n
as_select:                  SELECT database AS table_catalog
partition_key:
sorting_key:                n
primary_key:                n
sampling_key:
storage_policy:             default
total_rows:                 1
total_bytes:                99
lifetime_rows:              ᴺᵁᴸᴸ
lifetime_bytes:             ᴺᵁᴸᴸ
comment:
has_own_data:               0
loading_dependencies_database: []
loading_dependencies_table:    []
loading_dependent_database:    []
loading_dependent_table:       []