9951 explained code solutions for 126 technologies


clickhouseList all tables from all database


SELECT database, table FROM system.tablesctrl + c
system.tables

system table with info on all databases and tables on the server

database, table

selects database and table name


Usage example

SELECT database, table FROM system.tables
output
┌─database───────────┬─table──────────────────────────┐
│ INFORMATION_SCHEMA │ COLUMNS                        │
│ INFORMATION_SCHEMA │ SCHEMATA                       │
│ INFORMATION_SCHEMA │ TABLES                         │
│ INFORMATION_SCHEMA │ VIEWS                          │
│ default            │ tbl                            │
│ default            │ tbl1                           │
...