查询指定范围内数据记录(适用于sqlserver2005以上)
时间:2011-04-02 来源:段亮亮
1 WITH OrderedOrders AS
2 (SELECT ROW_NUMBER()over(order by g_Id asc) as RowNumber,g_Id FROM guanxi)
3 SELECT *
4 FROM OrderedOrders
5 WHERE RowNumber BETWEEN 50 AND 60;
2 (SELECT ROW_NUMBER()over(order by g_Id asc) as RowNumber,g_Id FROM guanxi)
3 SELECT *
4 FROM OrderedOrders
5 WHERE RowNumber BETWEEN 50 AND 60;
相关阅读 更多 +