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

How to provide values to user defined function parameters?

1008


What is field in algebra?

1038


Explain database normalization?

1229


there is a trigger defined for insert operations on a table, in an oltp system. The trigger is written to instantiate a com object and pass the newly inserted rows to it for some custom processing. What do you think of this implementation? Can this be implemented better? : Sql server database administration

921


How to edit table in sql server 2017?

926


Are connections to sql server encrypted?

1003


Why you need indexing? Where that is stored and what you mean by schema object? For what purpose we are using view?

910


Do you have any idea about the tcl commands?

964


can an order by clause be used in a creation of a view?

1183


explain different types of backups avaialabe in sql server? : Sql server database administration

968


What are views in ms sql server?

1084


How to update values in a table with update statements in ms sql server?

1013


Tell me what is difference between view and materialized view?

938


What is the difference between having clause and where clause in sql server?

1100


How do I create a stored procedure in sql server?

1034