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 the second largest salary in the emp database and
also How to find 3rd,4th and so on ........ in the emp database

plz mail the answer @ mak2786@gmail.com

Answer Posted / bobby

select p.emp_id,p.name,p.salary from
( select emp_id,name,salary,dense_rank()over( order by
salary desc)rank
from empTable )p
where rank=2

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is use of except clause?

1049


what method you can use to reduce the overhead of Reporting Services data sources?

244


write an SQL query to list the employees who joined in the month of January?

1647


What samples and sample databases are provided by microsoft?

1010


What is the difference between stored procedure and functions?

1083


Explain about builtinadministrator?

1017


How do I view a script in sql server?

999


Can you pass expressions to stored procedure parameters?

993


Why should we go for stored procedures? Why not direct queries?

1055


How to start and end transact-sql statements?

994


What is tcl in sql server?

1092


Write the queries for commands like Create Table, Delete table, Drop Table etc.

1055


What happens if date-only values are provided as date and time literals?

993


Suppose you want to implement the one-to-many relationships while designing tables. How would you do it?

932


What are truncate options available in sql server? : sql server database administration

989