clickhouse

Drop multiple tables at once in ClickHouse


I'm trying to drop a few tables at once on a ClickHouse cluster. As example:

DROP TABLE IF EXISTS default.log_null, default.null_view

I get the error:

Code: 62, e.displayText() = DB::Exception: Syntax error: failed at position 39 (','): , default.null_view. Expected one of: NO DELAY, end of query, INTO OUTFILE, SETTINGS, ON, FORMAT, SYNC (version 21.3.13.9 (official build))

What is the correct syntax if such action is supported?


Solution

  • Thanks  devurandom for mentioned that this one was iplemented.

    I tested that is works on default and on a custom database.

    Example:

    drop table vs.repmergetree,vs.repmergetree1, vs.repmergetree2

    This drops all three tables.