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

What is range partitioning?

1014


How to read xml file in oracle pl sql?

951


Define SQL and state the differences between SQL and other conventional programming Languages?

1265


Explain ttitle and btitle.

1165


How many types of keys are there in sql?

1088


What is on delete set null?

1137


what is rdbms? : Sql dba

1066


How to run sql statements through the web interface?

1095


When can we use the where clause and the having clause?

1087


How do I edit a stored procedure?

1050


Explain how to use transactions efficiently : transact sql

1017


What are the triggers associated with image items?

1091


What is the usage of distinct keyword?

1116


What are stuff and replace function?

1143


What is user defined functions?

1031