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 cursors be part of a trigger body?

1648


What is rank () in sql?

956


What is the most common sql injection tool?

1052


Why do we use sql constraints? Which constraints we can use while creating database in sql?

1049


How many columns should be in an index?

969


Explain the working of foreign key?

1077


What is identity column in sql server?

1055


what is cursor and its type, what is ref cursor write a syntax to pass ref cursor into procedure out fucntion and call the procedure

1820


how to do backup entire database? : Transact sql

1155


What are tables and fields?

1048


Which is faster union or join?

982


Explain unique key in sql.

1022


what is a stored procedure? : Sql dba

1147


What company owns postgresql?

1039


Differentiate pl/sql and sql?

1071