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

To find second largest salary in Employee table

Answer Posted / ram

select *from emp e where &n in(select count(distinct sal)
from emp m where e.sal<=m.sal);

which will ask's u like :

enter the value for n : 2 (enter 2)
gives u second highest.

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a constant or literal in ms sql server?

1100


What is a trigger what are the advantages of trigger?

1065


Does sql server 2000 clustering support load balancing?

1027


What is nonclustered index on computed columns?

1000


What are the dmvs? : sql server database administration

1122


How to get the query of a table in sql server?

965


How do I find the query plan in sql server?

1019


How to concatenate two character strings together?

1170


How to create nested stored procedure?

1074


Explain the difference between functions and stored procedures in sql server?

1022


What is sql server agent and what are the two modes of authentication in sql server?

1112


What is the purpose of grouping data in a report?

1017


When would you use it?

1043


Does any body please help me what question's have asked for SSRS in the interview?

2204


Is truncate a dml command?

1000