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 / imran raza

ORDER BY Clause inside Inline View is not permissible.So in
query (SELECT TITLE FROM MOVIE ORDER BY RANK DESC)it should
be only SELECT TITLE FROM MOVIE .
Moreover Order by can be used by specifying the name (
selected row) of coloumn in order by clause.
Instead of names numbers can also be used.ie Order by 1.

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is oracle and what are its different editions?

581


What is an oracle transaction?

588


Explain enable novalidate constraint.

597


How do I connect to oracle?

562


What is the difference between a hot backup and a cold backup in oracle?

573






What is the order of defining local variables and sub procedures/functions?

599


i have a question here... As of my knowledge, when we apply an index (b-tree)on a column, internally it arranges the data in b-tree format and do the fetching process correspondingly... and my quetion is... How a bit-map index arranges the data internally when applied on a column?IS it in b-tree format or whatelse?

1470


Can we use oracle pl/sql block in core java? if so how? pls get back to me .....

2504


What is Java Pool in Oracle?

604


Explain the use of consistent option in exp command.

552


How do I decide when to use right joins/left joins or inner joins or how to determine which table is on which side?

546


Why do we need oracle client?

511


How to list all user accounts in oracle?

612


In XIR2 if we lost the administration password .How can we regain the password?thanks in advance.

1470


Please explain oracle data types with examples?

590