Home > database >  How Oracle query where rownum line number?
How Oracle query where rownum line number?

Time:09-15

Question is like this, I'm from a view, no id want to query rownum is more than one row, the one row can be according to the where out, but this one line of data query its rownum is 1, I want to get it in the entire rows in the table is what to do,

CodePudding user response:

Through the subquery and inferior rownum fixed into a column, and then add the where condition query
Select * from (select t. *, t.r ownum rn from tab_name t) where...

CodePudding user response:

reference 1st floor js14982 response:
by subqueries and inferior rownum fixed into a column, then add the where condition query
Select * from (select t. *, t.r ownum rn from tab_name t) where...

Thank you, so that you can
  • Related