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

Is id a reserved word in sql?

1189


What sql does db2 use?

1028


How many types of functions are there in sql?

1009


Under what condition it is possible to have a page level lock and row lock at the same time for a query? : Transact sql

1047


How bulk collect improves performance?

1055


What is sqlerrd?

1016


what are date and time data types? : Sql dba

1028


What are the types of triggers in sql?

1143


What is user in sql?

1078


Which command is used to delete a package?

1236


What are the most important ddl statements in sql?

1189


What is pls_integer in pl sql?

1158


What does sign mean sql?

1183


What are the different types of dbmss?

1058


what are the advantages of using stored procedures? : Sql dba

1157