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 is the difference between blob and text? : Sql dba

1030


What is the purpose of normalization?

1052


What are the different types of tables in sql?

1016


What is posting?

1041


What is query optimization in sql?

990


How do I run a sql query in pgadmin 4?

968


Can we delete column in sql?

1108


What is the maximum size of sqlite database?

1117


How can I tell if sql is running?

1072


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

1145


Is a secondary key the same as a foreign key?

1046


What is sql catalog?

1029


What is sql*loader and what is it used for? : aql loader

1182


What are the differences between implicit and explicit cursors?

1071


Explain ddl statements in pl/sql?

1013