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

Name three of the features managed by the surface area configuration tool? : sql server security

1029


How many types of local tables are there in sql server?

976


what are user defined datatypes and when you should go for them? : Sql server database administration

1061


How to delete a database in ms sql server?

1316


Can we call stored procedure in trigger?

996


What are date and time data types in ms sql server?

1158


What do you understand by check constraint in sql server?

1010


What is difference between after and before?

1187


What does Master database contains?

1180


What is table join?

1170


What stored by the msdb? : sql server database administration

1051


Explain query editor regions

1108


Can a trigger be created on a view?

992


Explain trigger classes i.e. Instead of and after trigger?

917


What is transaction server auto commit?

1115