dimanche 8 février 2015

How to do this in MSSQL and SQLite

I have just read an article on keyset paging. The article uses PostgreSQL, and mentions an interesting way to compare multiple columns that I have not seen before.


It looks like this (3,2) > (2, 5), this returns true. It first compares the first numbers and if they are not equal it returns result. If they are equal it compares second numbers. This is very useful when doing keyset paging.


I couldn't figure out how this is called. Experimentally I found out that MSSQL and SQLite do not support this comparison method. I need something that does the same in both MSSQL and SQLite.


Aucun commentaire:

Enregistrer un commentaire