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 / surajit pathak

select * from emp e1
where 2>(select count(1) from emp e2
where e2.sal>e1.sal)
order by sal desc

Is This Answer Correct ?    1 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is sql a backend?

968


How to pipe multiline string to isql?

961


What is the difference between delete, truncate and drop command?

1063


What are the most important characteristics of pl/sql?

1080


What are the different types of dbmss?

965


How do you add a column to a table?

996


How do you optimize a query?

941


What is the difference between truncate and drop statements?

1086


What steps server process has to take to execute an update statement?

922


How many sql are there?

925


How do you know if a relationship is 2nf?

878


Explain table and field in sql?

1016


How long does it take to learn pl sql?

1002


What is the difference between local and global temporary table?

990


what is self join and what is the requirement of self join? : Sql dba

1078