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

SELECT * from
(SELECT * FROM emp ORDER BY sal DESC)
WHERE rownum <= 2
MINUS
SELECT * from
(SELECT * FROM emp ORDER BY sal DESC)
WHERE rownum < 2

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can a foreign key be a duplicate?

966


what is auto increment? : Sql dba

1051


How many types of cursors supported in pl/sql?

1260


What does joining a thread mean?

1077


what is single byte over head in oracle..?

2458


What is rownum in sql?

1095


What is trigger and how to use it in sql?

1070


What is localdb mssqllocaldb?

1107


what is the use of anchoring object? what r the difference between anchoring object & enclosing object? can any one tell me all the details?

2553


What is where clause in sql?

1088


what is union, minus and interact commands? : Sql dba

1257


List different type of expressions with the example.

973


What is the difference between execution of triggers and stored procedures?

1158


How does postgresql compare to mysql?

1080


How do you use join?

995