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

What is sql*plus?

1016


How to select random rows from a table?

1013


Why partition by is used in sql?

962


Is sql between inclusive?

1057


what is self join and what is the requirement of self join? : Sql dba

1075


How do I count duplicates in sql?

1024


What is vector point function?

999


How do you add a column to a table?

992


How do you remove duplicates without using distinct in sql?

918


Is oracel sql developer written in java?

1057


What sql does db2 use?

923


What is difference between hql and sql?

988


How do I install sql?

937


What is the primary key?

876


Describe types of sql statements?

989