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 find second highest salary of an employee.

Answer Posted / gautam poonia

SELECT sal
FROM (SELECT sal FROM emp
ORDER BY sal desc)
WHERE RowNum<=2
minus
SELECT sal
FROM (SELECT sal FROM emp
ORDER BY sal desc)
WHERE RowNum<=1

Is This Answer Correct ?    17 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what are the differences between binary and varbinary? : Sql dba

976


What is query execution plan in sql?

1124


What is auto increment in sql?

1060


What is transaction control language (tcl)?

1069


What are the different set operators available in sql?

970


Show the two pl/sql cursor exceptions.

1103


How many sql statements are used? Define them.

981


how can I make a script that can be bi-language (supports english, german)? : Sql dba

939


What are the set operators in sql?

1027


Is sql port 1433 encrypted?

968


How do you sort in sql?

946


how to convert character strings to dates? : Sql dba

978


Is subquery faster than join?

948


What is a relationship and what are they?

1047


What is difference between nchar and nvarchar?

953