1,sql server的分页
select top 2 * from stock where stock_id not in (select top 2 stock_id from stock)
执行顺序:
1,select * from stock 查出所有的记录
2,where stock_id not in where stock_id not in (select top 2 stock_id from stock)去掉前两条
3,在剩余的记录中去前两条记录top 2
1,sql server的分页
select top 2 * from stock where stock_id not in (select top 2 stock_id from stock)
1,select * from stock 查出所有的记录
2,where stock_id not in where stock_id not in (select top 2 stock_id from stock)去掉前两条
3,在剩余的记录中去前两条记录top 2