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

Write a query to find second highest salary of an employee.

Answer Posted / manoranjan

to select the nth highest salary from emp table

select distinct(a.sal) from emp a where &n=
(select count(distinct(b.sal))from emp b where a.sal<=b.sal);

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Differentiate between syntax and runtime errors.

1164


Write a sql query to find the names of employees that begin with ‘a’?

987


What is primary key secondary key alternate key candidate key?

1014


what is a foreign key ? : Sql dba

1063


What is data type in sql?

941


What is the difference between function and procedure in pl/sql?

1054


Why are aggregate functions called so?

932


Is it possible to create startup or shutdown trigger for on-schema?

1009


What is the file extension for sql database?

981


How much does a sql dba make? : SQL DBA

925


What is rename command in sql?

1002


How many types of cursors supported in pl/sql?

1158


Which operator is used in query for pattern matching?

1071


What is an alias command?

1038


How does one load ebcdic data? : aql loader

1147