0
一個面試問題:SQL,從表中選擇第N個到第M個記錄,哪個查詢更高效?
寫SQL Server查詢返回30日至表的第40記錄A
我的回答:
select top 10 * from (select top 40 * from tb desc) asc
select top 40 * from A where id not in(select top 30 id from A)
其中上述2是更有效率?爲什麼?