ClickHouse/docs/en/sql-reference/table-functions/merge.md
2022-03-29 22:06:21 -06:00

759 B

sidebar_position sidebar_label
38 merge

merge

Creates a temporary Merge table. The table structure is taken from the first table encountered that matches the regular expression.

Syntax

merge('db_name', 'tables_regexp')

Arguments

  • db_name — Possible values:

    • database name,
    • constant expression that returns a string with a database name, for example, currentDatabase(),
    • REGEXP(expression), where expression is a regular expression to match the DB names.
  • tables_regexp — A regular expression to match the table names in the specified DB or DBs.

See Also