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...

how to find nth highest salary

Answer Posted / amit

select * from emp as e1 where sal (n-1) = select distinct
(count(*) from emp as e2 where e2.sal>e1.sal)

Where n is no that u want which postion's salary u want
suppose second higest means n=2

Amit

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Data is not being delivered to subscribers, what can be the possible reasons? : sql server replication

1060


What command do we use to rename a database?

1091


what is the difference between delete table and truncate table commands? : Sql server database administration

1054


you added a row to a view, but the row is not shown on the view. Explain how this can happen, and how you can remedy the situation

953


Define magic tables in sql server?

1072


Why are sql functions used?

1126


What does top operator do?

1035


Explain the use of containers in ssis?

973


Define master database?

1082


We need to perform what steps in the following order to work with a cursor?

1228


How sql server enhances scalability of the database system?

1231


Tell me about pre-defined functions of sql?

1117


Explain what role entity and relationship play in an ER diagram.

1084


What is tabulation?

957


What are constraints?

1019