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 / hasnain hameed

select max(salary)
from emp
where salary < (select max(salary) from emp)
order by salary desc;





i think this is correct answer all of above because it take
less time to execute. retrive the answer quickly.

Is This Answer Correct ?    6 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is a database lock ? : Sql dba

1176


what does it mean to have quoted_identifier on? What are the implications of having it off? : Sql dba

1008


what are aggregate and scalar functions? : Sql dba

1060


What is trigger in sql? Explain

999


Why do we need view in sql?

991


What are sql queries used for?

1032


What is the difference between a primary key and a unique key?

1057


what is auto increment? : Sql dba

1015


What is AUTH_ID and AUTH_USER in pl/sql ?

2197


How do you determine the current isolation level? : Transact sql

1163


what happens when the column is set to auto increment and you reach the maximum value for that table? : Sql dba

1041


what is the difference between join and union? : Sql dba

1122


Can you select everything, but 1 or 2 fields, without writer's cramp?

986


What is natural join in sql?

998


What is the unique index?

1058