The system table system.databases contains information about all databases in the current environment, including the database name, engine, storage path, unique identifier, and others. It can be used for quickly viewing the database list and core attributes.
| | | | \
| Name | Data type | Description | |
|---|---|---|---|
| \ | |||
| name | String | The name of the database. | |
| \ | |||
| engine | String | The engine of the database. Fixed as "Cnch". | |
| \ | |||
| data_path | String | The storage path of the database data in the file system. | |
| \ | |||
| metadata_path | String | The path of the metadata, which is empty. | |
| \ | |||
| uuid | UUID | The unique UUID identifier of the database. |
Query databases in the current environment whose name contains demo:
SELECT name AS database_name, engine, data_path FROM system.databases WHERE name LIKE 'demo' ORDER BY name LIMIT 10;
Example of query results: