SHOW DATABASES returns the names of every database available in the ClickHouse server, optionally filtered by a pattern.
Listing databases helps you verify available schemas, audit new creations, and confirm naming before running queries that reference them.
Run SHOW DATABASES;
in any SQL client connected to ClickHouse. The server returns a single column called name
containing every database.
Add a LIKE
or NOT LIKE
clause. This reduces noise in clusters with many test environments.
Yes. SELECT name FROM system.databases;
is useful inside stored queries or when additional columns (engine, UUID) are required.
Grant SHOW DATABASES
only to roles that need discovery. Prefix non-production databases (e.g., dev_
) so pattern filters work. Document database purpose in Confluence or Galaxy Collections.
After confirming the ecommerce
database exists, switch context USE ecommerce;
and query tables such as Customers
, Orders
, and OrderItems
.
No. Database names in ClickHouse are case-insensitive, but they are returned in the original casing.
A role must have SHOW DATABASES
privilege or the broader SHOW
access type.
Detached databases do not appear. System-level internal databases like system
are always listed.