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 a tns service name?
How many types of tables are there in oracle?
How to increment dates by 1 in oracle?
How many categories of data types?
How to put more than 1000 values into an oracle in clause?
What is the exact use of Collections?
What is archive log in Oracle?
Explain the truncate in oracle?
Explain an integrity constrains?
Why do I get unexpected characters from 8-bit character sets in weblogic jdriver for oracle?
What exactly do quotation marks around the table name do?
HI ALL, CAN ANYONE TELL ME THE DIFFERENCES BETWEEN SQL CLUSTURS,MSQL CLUSTERS,ORACLE CLUSTERS.......THANKS IN ADVANCE
What is a trigger oracle?
How do I uninstall oracle client from windows?
why dont we assign not null constraint as table level constraint.