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...

how to retrieve the top 3 salaries of the table using rownum

Answer Posted / phantom coding

select * from (select rownum as rnum,t.* from emp order by
sal desc) a where rnum < 4

the alias to rownum (i.e:rnum) should be used. If rownum is
used for the constraint then the query would return the
first three rows it hits and the results could be wrong.

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is record in pl sql?

1009


How delete all data from table in sql?

948


Can you selectively load only those records that you need? : aql loader

984


When are we going to use truncate and delete?

925


Is sql workbench free?

929


What are different types of statements supported by sql?

1096


Is sql low level language?

961


How many aggregate functions are available there in sql?

929


What is flag in sql?

981


How do I restart sql?

912


How does an execution block start and end in pl sql?

900


What is group function in sql?

964


how many ways we can we find the current date using mysql? : Sql dba

1035


How do you use join?

887


What is procedure explain with example?

894