作者:难得有人待我好_212 | 来源:互联网 | 2023-05-18 00:45
Ihavejustreadanarticleonkeysetpaging.ThearticleusesPostgreSQL,andmentionsaninteresti
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.
我刚读了一篇关于键集分页的文章。本文使用PostgreSQL,并提到了一种有趣的方法来比较我之前从未见过的多个列。
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.
它看起来像这个(3,2)>(2,5),这返回true。它首先比较第一个数字,如果它们不相等则返回结果。如果它们相等,则比较第二个数字。这在进行键集分页时非常有用。
I couldn't figure out how this is called. Experimentally I found out that SQL Server and SQLite do not support this comparison method. I need something that does the same in both SQL Server and SQLite.
我无法弄清楚这是怎么称呼的。实验上我发现SQL Server和SQLite不支持这种比较方法。我需要在SQL Server和SQLite中都做同样的事情。
1 个解决方案