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 find the second highest salary from emp table?

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 u want

Is This Answer Correct ?    18 Yes 22 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is rename in sql?

977


How do I run pl sql in sql developer?

1120


What is the difference between rename and alias?

1344


How can a pl sql block be executed?

949


What are different types of keys?

1106


What is the command used to fetch first 5 characters of the string?

1403


When a dml statement is executed, in which cursor attributes, the outcome of the statement is saved?

1118


Can we rollback after truncate?

1033


What type of database is sql?

1029


What is execution plan in sql?

1052


What is data control language?

994


What is the primary use of normalization?

1006


Can you join a table to itself?

1133


How do you update a sql procedure?

1032


Explain the uses of a database trigger?

1044