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 get second highest salary in SQL(as/4000

Answer Posted / sreekanth

SELECT MIN(SAL)
FROM(SELECT DISTINCT SAL FROM EMP
ORDER BY SAL DESC)
WHERE ROWNUM <= :N
where n is the nth highest salary.
In most of the answers,our friends have written 'where
rownum=2',but this never retreives a row.

Is This Answer Correct ?    5 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a full join sql?

1105


What are the types of operators available in sql?

1129


what is the difference between mysql_fetch_object and mysql_fetch_array? : Sql dba

1136


What is the purpose of the sql select top clause?

1208


Can we change the table name in sql?

1005


What is view? Can we update view

1523


How many types of index are there?

1104


What is procedure in pl sql?

1092


What can you do with pl sql?

1145


What is the purpose of the primary key?

1117


What are character functions?

1141


Explain constraints in sql?

1088


Is id a reserved word in sql?

1189


explain commit and rollback in mysql : sql dba

1076


Why sql query is slow?

1044