How to Create a Temporary Table in ClickHouse

In ClickHouse, you can create a tempory table using the CREATE TABLE statement and specifying ENGINE = Memory():

CREATE TABLE events (
    user_id UInt32,
    timestamp DateTime,
    message Nullable(String)
) ENGINE = Memory()

Or by using the CREATE TEMPORARY TABLE statement (which also uses the Memory engine):

CREATE TABLE TABLE events (
    user_id UInt32,
    timestamp DateTime,
    message Nullable(String)
)

Learn More

Get started with DB Pilot

DB Pilot is a Database GUI client and SQL editor for PostgreSQL, MySQL, SQLite, DuckDB & more.