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

Find 2nd Highest salery in emp table

Select* from emp where &n=
select * count from emp where (salery >=emp.salery)


Enter n value 2


These query is correct or not. Tell me any other methods.

Answer Posted / ramu

by using sub quries we can do
select * from emp where sal=select max(sal) from emp where
sal<select max(sal) from emp;

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain how many types of relationship?

1009


What is the library index called?

1041


Retrieve the unique rows from table without using UNIQUE and DISTINCT keywords.

991


What is the difference between Normalization and De-normalization?

1071


How to make conditional sum in ssrs?

177


Stored Procedure returns data from multiple tables. How to access it in your ASP.Net code?

1041


what is a transaction and what are acid properties? : Sql server database administration

1007


What stored by the msdb?

980


What is the order by used for?

1005


Do you know what is sql service broker?

1054


Why do we backup Active Directory ?

1029


What does the update command do?

1096


How to see the event list of an existing trigger using sys.trigger_events?

1058


How to convert numeric values to integers in ms sql server?

1063


Can group by be used without aggregate functions?

898