How to Create a Database in ClickHouse
Last updated July 25, 2026 · By the SaturnSQL team
Use CREATE DATABASE, optionally with IF NOT EXISTS. New databases use the Atomic engine by default, which gives atomic RENAME and non-blocking DROP. Special engines like MySQL or PostgreSQL expose external databases as read-through proxies.
CREATE DATABASE IF NOT EXISTS analytics;Proxy an external database
CREATE DATABASE mysql_shop
ENGINE = MySQL('mysql-host:3306', 'shop', 'reader', 'secret');List databases with SHOW DATABASES and switch with USE analytics. Fully qualified names (analytics.events) work everywhere, so USE is optional.
Run this in SaturnSQL
SaturnSQL is a browser-based SQL editor for teams: shared query library, schema-aware autocomplete, and scheduled exports to Google Sheets and Slack.
Try it free