v.21.1Improvements

Return Artificial Create Query for Show Create Table on System Tables

Return artificial create query when executing show create table on system's tables. #31391 (SuperDJY).
Return an artificial CREATE TABLE query when executing SHOW CREATE TABLE on system tables.

Why it matters

System tables in ClickHouse usually do not have an explicit CREATE TABLE statement since they are virtual or internal. This feature provides users with a generated CREATE TABLE query that describes the structure of system tables, improving usability and clarity when inspecting system tables.

How to use it

Simply execute the SHOW CREATE TABLE <system_table_name> command on any system table to get the artificial CREATE TABLE statement representing the structure of that system table.