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 get 2nd maximum salary in an employee table ?

Answer Posted / anil_abbireddy

select * from emp a where 2=(select count(distinct sal)
from emp b where a.sal<=b.sal)

Is This Answer Correct ?    30 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you do multiple joins in sql?

970


in oracle 10g sw after compiling procedure how to pass parameter values ,if we (v_empid out number)how to give empid after successful compilation program.This site exact suitable for 10g with respect to question & answer same format , im trying sql browser & sql command prompt using exec procedure name & respective parameters.

2021


What is the max nvarchar size?

897


How many sql databases can you have on one server?

1017


what is the difference between $message and $$message? : Sql dba

944


what is not null constraint? : Sql dba

964


What is the file extension for sql database?

936


Does user triggers have entry for trigger with compilation errors?

973


how to use case expression? : Sql dba

958


Where do we use pl sql?

943


Can you load data into multiple tables at once? : aql loader

1021


how to delete an existing column in a table? : Sql dba

952


What is rownum in sql?

965


How much ram can sql express use?

929


What is the difference between a primary key and a clustered index?

930