Skip to main content

databases

Contains information about the databases that are available to the current user.

Columns:

The name column from this system table is used for implementing the SHOW DATABASES query.

Example

Create a database.

CREATE DATABASE test;

Check all of the available databases to the user.

SELECT * FROM system.databases;
β”Œβ”€name───────────────┬─engine─┬─data_path──────────────────┬─metadata_path───────────────────────────────────────────────────────┬─uuid─────────────────────────────────┬─comment─┐
β”‚ INFORMATION_SCHEMA β”‚ Memory β”‚ /var/lib/clickhouse/ β”‚ β”‚ 00000000-0000-0000-0000-000000000000 β”‚ β”‚
β”‚ default β”‚ Atomic β”‚ /var/lib/clickhouse/store/ β”‚ /var/lib/clickhouse/store/d31/d317b4bd-3595-4386-81ee-c2334694128a/ β”‚ 24363899-31d7-42a0-a436-389931d752a0 β”‚ β”‚
β”‚ information_schema β”‚ Memory β”‚ /var/lib/clickhouse/ β”‚ β”‚ 00000000-0000-0000-0000-000000000000 β”‚ β”‚
β”‚ system β”‚ Atomic β”‚ /var/lib/clickhouse/store/ β”‚ /var/lib/clickhouse/store/1d1/1d1c869d-e465-4b1b-a51f-be033436ebf9/ β”‚ 03e9f3d1-cc88-4a49-83e9-f3d1cc881a49 β”‚ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜