v.20.5New Feature

OFFSET keyword now usable without LIMIT clause

OFFSET keyword can now be used without an affiliated LIMIT clause. #10802 (Guillaume Tassery).
OFFSET keyword can now be used independently without requiring an accompanying LIMIT clause.

Why it matters

Previously, the OFFSET clause in ClickHouse queries had to be used together with a LIMIT clause, which limited the flexibility of query pagination and data skipping. Allowing OFFSET to be used alone enables users to skip a number of rows without explicitly specifying a limit, enhancing query expressiveness and convenience.

How to use it

Simply use the OFFSET clause in your SQL query without pairing it with a LIMIT clause, for example:

SELECT *
FROM table_name
OFFSET 100

This will skip the first 100 rows and return all rows thereafter.