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

How to run queries with sql server management studio express?

1022


what are statistics, under what circumstances they go out of date, how do you update them? : Sql server database administration

899


What are the pre-defined functions in the sql server?

1030


What is the architecture of ms sql reporting service?

924


What are commonly used odbc functions in php?

974


What is bit data type? What's the information that can be stored inside a bit column?

878


How optimize sql query with multiple joins in sql server?

829


Explain contrast amongst grouped and non-bunched records?

963


How to transfer an existing table from one schema to another schema in ms sql server?

927


What are the two authentication modes in sql server?

1062


Can we use where clause in union?

1005


what is a schema in sql server 2005? Explain how to create a new schema in a database? : Sql server database administration

956


What is the security principal at the server level that represents your session?

965


Do you know what is a trace frag? Where do we use it?

957


What are the types of ssrs?

139