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 / swapnareddy

select sal from emp a where 3>(select
count(distinct(sal))from emp b where a.sal<b.sal);

Is This Answer Correct ?    4 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what are rollup and cube in t-sql? : Transact sql

1099


how to calculate the difference between two dates? : Sql dba

1062


What is auto increment?

999


which types of join is used in sql widely? : Sql dba

982


What is rank function in sql?

1028


How would you reference column values before and after you have inserted and deleted triggers?

1065


How do I partition a table in sql?

1131


What is a natural join sql?

976


Explain the difference between triggers and constraints?

975


How much does sqlite cost?

1040


How do I count records in sql?

1008


Why join is faster than subquery?

1113


Are pl sql variables case sensitive?

1050


What are the two virtual tables available at the time of database trigger execution?

1222


What is the use of double ampersand (&&) in sql queries? Give an example

1139