v.20.11New Feature

New Feature: Identifiers via Query Parameters for Table Objects or Columns

Now we can provide identifiers via query parameters. And these parameters can be used as table objects or columns. #16594 (Amos Bird).
ClickHouse now supports providing identifiers via query parameters, allowing these parameters to be used as table names or column names in queries.

Why it matters

This feature enables more dynamic and flexible query construction by allowing users to parameterize identifiers such as table or column names. It simplifies query generation and enhances security by avoiding direct string interpolation for identifiers.

How to use it

Users can pass identifiers as query parameters when executing queries, and reference these parameters as tables or columns within the query. This is done by specifying the identifier parameters and then using them in the query just like regular table or column names.