v.18.12Improvement

CASE Expression Now Allows Omitting ELSE Clause

For a CASE expression with conditions, you can now omit ELSE, which is equivalent to ELSE NULL. #2920
ClickHouse now allows CASE expressions to omit the ELSE clause, treating it as ELSE NULL by default.

Why it matters

This feature simplifies writing CASE expressions by removing the need to explicitly specify ELSE NULL when no alternate case is needed, reducing verbosity and improving code readability.

How to use it

When writing a CASE expression with conditions, users can simply omit the ELSE clause. The expression will implicitly assume ELSE NULL without any additional syntax.