Skip to main content
Creates a temporary Merge table. The table schema is derived from underlying tables by using a union of their columns and by deriving common types. The same virtual columns are available as for the Merge table engine.

Syntax

Arguments

Access rights

The matched tables are read with the same access rules as for the Merge table engine. Data is read only from the matched tables that the current user can see, that is, has the SHOW TABLES privilege on, and the table schema is derived only from them. A matched table that the user cannot see is skipped without an error. Deriving the schema requires the SHOW COLUMNS privilege on the tables it is derived from. Reading a matched table that the user can see requires the SELECT privilege on the columns that the query reads, otherwise the query fails with ACCESS_DENIED.