sql 中如何取出指定行: Row_Number

原文:sql 中如何取出指定行: Row_Number

ROW_NUMBER (Transact-SQL)

 

USE AdventureWorks2008R2;
GO
WITH OrderedOrders AS
(
    SELECT SalesOrderID, OrderDate,
    ROW_NUMBER() OVER (ORDER BY OrderDate) AS ‘RowNumber‘
    FROM Sales.SalesOrderHeader
)
SELECT *
FROM OrderedOrders
WHERE RowNumber BETWEEN 50 AND 60;

sql 中如何取出指定行: Row_Number

上一篇:美图秀秀DBA谈MySQL运维及优化


下一篇:Android实现TCP断点上传,后台C#服务实现接收