v.24.5Improvement

Allow Trailing Commas in Values Format

Allow trailing commas in the Values format. For example, this query is allowed: INSERT INTO test (a, b, c) VALUES (4, 5, 6,);. #63810 (Alexey Milovidov).
Allow trailing commas in the Values format for INSERT queries in ClickHouse.

Why it matters

This feature solves the problem of syntax errors caused by trailing commas in the Values clause during data insertion. It improves user experience by permitting a more flexible and forgiving syntax, making it easier to write or generate SQL statements without worrying about removing trailing commas.

How to use it

Users can now use trailing commas in the Values clause of INSERT statements without any special configuration. For example, the following query is valid:

INSERT INTO test (a, b, c) VALUES (4, 5, 6,);