SELECT * FROM
(SELECT TITLE FROM MOVIE ORDER BY RANK DESC)
WHERE ROWNUM > 4;
when i run the above query .it produces output as NO ROWS
SELECTED.why ?plz any one help me
Answer Posted / vamsi krishna
the reason behind this is rownum will be generated only
after selecting the row from the table.hence when you are
using inline views ,the outer select statement is having a
rownum and inner select statement is having a rownum,so due
to the ambiguity your query is not working.
i give the following change to ur query.
SELECT * FROM
(SELECT rownum as r1,TITLE FROM MOVIE )
WHERE r1 > 4;
| Is This Answer Correct ? | 5 Yes | 4 No |
Post New Answer View All Answers
What are the different editions of oracle?
How to drop an index in oracle?
What is an oracle user role?
How to use subqueries in the from clause in oracle?
What is the difference between "as" and "is" in an oracle stored procedure?
hi friends i completed b.com 2004.i have 3y accounting exp. in manufacturing company.now i have completed oracle finance.pls suggest me how will get job in oracle.can i get job in oracle.
How do I decide when to use right joins/left joins or inner joins or how to determine which table is on which side?
What is flashback in Oracle?
What happens internally when the user types userID/password@string in SQL PLUS Thanks-Bhaskar
In XIR2 if we lost the administration password .How can we regain the password?thanks in advance.
How to create an oracle database manually?
Explain about integrity constraint?
How to define an anonymous procedure with variables?
How many categories of data types?
Name the various constraints used in oracle?