SQL Query With Row_Number, order by and where clause

后端 未结 5 1900
遥遥无期
遥遥无期 2021-01-21 03:33

I have the following SQL query:

select
     ID, COLUMN1, COLUMN2
from
     (select ID, COLUMN1, COLUMN2, row_number() over (order by 2 DESC) NO from A_TABLE)
whe         


        
5条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-21 03:47

    Here you will get the limited record from the oracle database without the usage of rownum

    select * from 
        ( select ,column1,column2,row_number() over (order by columnName) as rnum 
          from table_name) 
    where rnum between 5 and 10;
    

提交回复
热议问题