v.19.14New Feature
WITH TIES Modifier for LIMIT
WITH TIESmodifier forLIMIT. (continuation of #5069) #6610 (Anton Popov)
Why it matters
This feature addresses the limitation of the standardLIMIT clause by allowing retrieval of all rows that share the same ordering value as the last row within the limit. It is valuable for accurately capturing tied results in sorted datasets without arbitrary truncation.How to use it
To use this feature, appendWITH TIES to your LIMIT clause in a query with an ORDER BY clause. For example:SELECT * FROM table_name
ORDER BY column_name
LIMIT 10 WITH TIES