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

How to rename an index in oracle?

614


Give the various rollback segment states.

575


What is the best way to do multi-row insert in oracle?

557


Explain what are the type of synonyms?

574


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

594






how the Oracle Prepares the Execution Plan and how it chooses the Optimal one?

1820


How to connect to the server with user account: sys?

557


Typically, where is the conventional directory structure chosen for Oracle binaries to reside?

1577


What is the difference between sharding and partitioning?

495


When do we use group by clause in a sql query?

564


Explain an exception?

563


What is the cache hit ratio, what impact does it have on performance of an Oracle database and what is involved in tuning it?

1603


How to start a new transaction in oracle?

586


Name the three major set of files on disk that compose a database in Oracle?

627


How to loop through data rows in the implicit cursor?

537