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 the use of prepared statement?

996


What are the two types of periodical indexes?

925


What is the basic structure of an sql?

1079


what is a tablespace? : Sql dba

1038


What is sap sql anywhere?

1050


Which is faster count (*) or count 1?

1010


what are the difference between clustered and a non-clustered index? : Sql dba

1013


What is percent sign in sql?

1266


Can you call pl/sql package functions from within a fast formula?

1021


Why self join is used in sql?

963


what is the difference between truncate and drop statements? : Sql dba

1098


What does subquery mean in sql?

1035


How to check if a column is nullable before setting to nullable?

1104


What is left join example?

934


how to include character strings in sql statements? : Sql dba

1047