v.20.10New Feature

Add null() function for table structure in ClickHouse

Add table function null('structure'). #14797 (vxider).
Added a new table function null('structure') that generates empty tables with the specified structure.

Why it matters

This feature allows users to create empty tables with a defined structure without inserting any data. It is useful for testing, query planning, and scenarios where a table schema is needed but no data is required.

How to use it

Use the table function by specifying the desired structure inside null(). For example:

sql<br>SELECT * FROM null('id Int32, name String')<br>
This will produce an empty table with the columns id and name but no rows.