v.18.12New Feature

Asterisk Behavior in JOIN Queries and Configuration Adjustment in SQL

In queries with JOIN, the star character expands to a list of columns in all tables, in compliance with the SQL standard. You can restore the old behavior by setting asterisk_left_columns_only to 1 on the user configuration level. Winter Zhang
In queries with JOIN, the star character (*) now expands to include columns from all joined tables, following the SQL standard.

Why it matters

This feature solves the inconsistency in how the star operator expands column lists in JOIN queries by aligning ClickHouse with the SQL standard. It improves query predictability and correctness when selecting columns across multiple tables.

How to use it

By default, the star operator expands to columns from all tables in a JOIN. To revert to the previous behavior where * expands only to left table columns, set asterisk_left_columns_only = 1 at the user configuration level.