分页的sql语句。

select top 10 * from  [Northwind].[dbo].[Orders] where OrderID  NOT IN

(SELECT top 20 OrderID   from [Northwind].[dbo].[Orders] order by OrderID )order by OrderID

 

 

select  top 10 *from  [Northwind].[dbo].[Orders] where OrderID >

selectISNULL(MAX(OrderID),0)FROM

selecttop 20 OrderID   from [Northwind].[dbo].[Orders] orderby OrderID )  A )

orderby OrderID 

你可能感兴趣的:(sql语句)