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

Can you always create a cache of a report?

174


Explain trigger and its types?

1071


What is Sqlpaging in SqlServer 2005 ?

1072


What are ddl (data definition language) statements for tables in ms sql server?

1109


What is wrong with sql server client libarary dll, ntwdblib.dll?

1049


What are cursors? Explain the different types of cursors Enlist a few disadvantages of cursors.

1276


How do I create a stored procedure in dbml?

1015


Explain where clause?

996


What are the lambda triggers?

917


How to count duplicated values in a column in ms sql server?

1099


What is partition, how will you implement it? : sql server analysis services, ssas

1060


What are distinctive joins find as a part of sql?

955


What is the difference between inner join and equi join?

1005


What is a mixed extent?

1037


Do you know sql server 2008 introduces automatic auditing?

991