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

What's the procedure?

984


How do I know if I have sql express or standard?

1067


What is a stored procedure in sql with example?

1204


What is restrict in sql?

1179


what is blob? : Sql dba

1222


how to load data files into tables with 'mysqlimport'? : Sql dba

1148


What is mutating error?

1007


What is clustered and nonclustered index in sql?

987


What are user defined functions?

1067


How would you reference column values before and after you have inserted and deleted triggers?

1117


What is the difference between a database and a relational database?

1158


Define sql delete statement.

1067


Explain correlated query work?

1109


How do I tune a sql query?

1043


Is sql harder than python?

1159