select * from (select ROW_NUMBER() OVER(order by userid) as rowNum,*
from ( select * from T_FW_meetemergencyuser where 1=1 ) temp) a where rowNum <= 16 ————sql
用一个方法来代替 ORACLE 中的 rowNum 可以使 ORACLE 和SQL 得到相同的查询结果
SELECT * FROM (SELECT A.*, rownum r
FROM (SELECT * FROM T_FW_meetemergencyuser where 1=1 ORDER BY userid desc) A WHERE rownum <= 16) B WHERE r > 0 _____ORACLE