I am working on cursor based pagination using multiple columns. I need to make a tuple comparison since date might not be a unique value.
When I am using MySQL and PostgreSQL, I can do it like this.
WHERE (date, id) < (:date, :id) ORDER BY date DESC, id DESC
I can't do the same with Oracle and SQL Server. I am wondering how can I do a tuple comparison with those databases.
null
values if your columns are nullable). If you can define the logic, there are plenty of folks that can help you implement in SQL Server and/or Oracle. It may take longer for someone that also knows the exact definition in MySQL.