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 is the best way to do multi-row insert in oracle?
what is the use of system.effective.date variable in oracle?
When system tablespace is created?
Is postgres faster than oracle?
What is an oracle user account?
What are the types of partitions in oracle?
Is it possible to center an object horizontally in a repeating frame that has a variable horizontal size ?
Explain what are synonyms used for?
How to bring a tablespace online?
How to use subqueries with the in operator using oracle?
How do I find my oracle client driver version?
Which dictionary view(s) would you first look at to understand or get a high-level idea of a given Advanced Replication environment?
How is it different from a normal table?
How to best split csv strings in oracle 9i?
Are truncate and delete commands same? If so why?