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

What is awe?

1078


What do you understand by replication in sql server? Mention the different types of replication in sql server.

994


What is dirty read?

1135


What is log ldf?

1044


Explain what is it unwise to create wide clustered index keys?

1023


Tell me what is the order in which the sql query is executed?

1014


Explain aggregate functions?

1139


Explain the etl (extraction, transformation, and loading)?

1052


What is the difference between Clustered and Non-Clustered Index?

1102


What is a raid and what are different types of raid configurations?

1321


Is foreign key unique?

1047


What is difference between count (*) and count 1?

976


How do you make a trace?

1073


List down some advantages of sql stored procedure?

1015


How to change parameter value inside the report?

169