Dynamic SQL in ClickHouse

Many database systems offer the ability to evaluate an arbitrary string as SQL and run the resulting query - EXECUTE IMMEDIATE in Oracle, EXECUTE in Postgres. ClickHouse didn’t have this ability to run dynamic SQL - until recently. But this changed with version 26.7 . Let’s take a look. Parameters in queries What ClickHouse has had for a long time is query parameters . In the client or in the SQL…