面试问题:
编写SQL Server查询以返回表A的第30到第40条记录
我的答案:
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)
Run Code Online (Sandbox Code Playgroud)
以上哪个更有效率?为什么?
| 归档时间: |
|
| 查看次数: |
3196 次 |
| 最近记录: |