Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

How to add a new column to an existing table with a default value?

967


What is a nvl function? How can it be used?

960


Explain oracle left join with an example?

956


How to select all columns of all rows from a table in oracle?

993


What is concurrency in oracle?

949


How to insert a new row into a table in oracle?

1096


What is enter substitution variable in oracle?

984


Is insert autocommit in oracle?

1019


Explain mutating triggers.

974


What is the difference between online and offline backups?

974


Can we convert a date to char in oracle and if so, what would be the syntax?

960


Explain enable novalidate constraint.

1035


What are oracle functions?

976


How can you use check constraints for self referential integrity?

920


Briefly explain what is literal? Give an example where it can be used?

975