语句转化
求sql:
Select * from (Select *,ROW_NUMBER() OVER (ORDER BY ID DESC ) AS number from Employee ) as Result Where number between cast(1 as varchar) and cast(2 as varchar)
转换成access的语句?
转换成orcle的语句?
[解决办法]
oracle
直接用
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 numberFROM Employeen AS aWhere number between '1' and '2'
[解决办法]
SELECT *FROM ( SELECT * ,--oracle的話這裡的*需要改成把表字段逐一列出,也有可能我的plsql的版本有點老。。。 ROW_NUMBER() OVER ( ORDER BY ID DESC ) AS number FROM Employee ) AS ResultWHERE number in (1,2)