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 / rajesh

Guess this works...

select max(sal)
from (select * from emp
where sal not in (select max(sal) from emp))

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how mysql optimizes distinct? : Sql dba

1075


What is sql resultset?

979


What are sql objects?

1075


What is compiled query?

1031


What is primary and foreign key?

1058


How does postgresql compare to mysql?

1032


What is the difference between the repeatable read and serializable isolation levels? : Transact sql

1093


How can we debug in PL/SQL?

1131


Is stored procedure faster than query?

965


describe mysql connection using mysql binary. : Sql dba

1060


What is mdb stand for?

1005


How do I remove all records from a table?

1068


Which is better stored procedure or query?

955


What is Collation Sensitivity ? What are the various type ?

950


what is text? : Sql dba

1065