日期:2014-05-18 浏览次数:20479 次
Select * from (Select *,ROW_NUMBER() OVER (ORDER BY ID DESC ) AS number from Employee ) as Result Where number between '1' and '2'
------解决方案--------------------
access 里貌似没有row_number 函数.oracle 里有.
------解决方案--------------------
access這樣試試
SELECT *, (SELECT COUNT(*) FROM Employeen WHERE ID<=a.ID) AS number FROM Employeen AS a Where number between '1' and '2'
------解决方案--------------------
SELECT * FROM ( SELECT * ,--oracle的話這裡的*需要改成把表字段逐一列出,也有可能我的plsql的版本有點老。。。 ROW_NUMBER() OVER ( ORDER BY ID DESC ) AS number FROM Employee ) AS Result WHERE number in (1,2)