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 injection owasp?

1070


How to use distinct and count in sql query? Explain

1032


Where is pl sql used?

958


What is dml and ddl?

967


What is a natural join sql?

992


What is linq to sql?

1139


Can we use update in sql function?

1069


Can we join two tables without common column?

1014


how do you know the version of your mysql server? : Sql dba

1008


What is pl sql package?

1039


What is data modelling in sql?

1026


Describe different types of general function used in sql?

1042


What are the various restrictions imposed on view in terms of dml?

968


Is sql workbench free?

1006


What is a function in oracle pl sql?

1044