sql 分页

时间:2015-05-28 22:44:04   收藏:0   阅读:315

 

sql 分页

alter proc P_Order
@n int ,@m int --n条 m 页
As
select top (@n) * from dbo.[Order Details] where OrderID not in ( select top ((@m -1)*@n) OrderID from dbo.[Order Details] order by OrderID) order by OrderID

exec P_Order @n=10,@m=8

原文:http://www.cnblogs.com/laopo/p/4537063.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!