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

Can we use rowid as primary key?

1043


What is crud sql?

1026


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

2156


How delete a row in sql?

1041


Explain the order of sql statement execution?

1087


What is the difference between an inner and outer join?

1058


how can we transpose a table using sql (changing rows to column or vice-versa) ? : Sql dba

998


How many types of relationship are there?

1082


When sql appeared?

1148


what are local and global variables and their differences? : Sql dba

1134


what is the syntax for using sql_variant_property? : Transact sql

1083


How do I send sql query results to excel?

1111


What action do you have to perform before retrieving data from the next result set of a stored procedure ?

2610


Why sql query is slow?

1041


What is partition by in sql?

1126