can anybody tell us, how to select 2nd max salary from
table.
my id is ashish.akk@gmail.com
Answer Posted / govind.konduri
hai..
select sal from emp where sal=(select max(sal) from
emp where sal<(select max(sal) from emp))
->here,the sub inner query finds the max sal from emp table.
->the main inner query find out the max sal that is less
than the sub inner query max sal.
->the sub query result is sent to outer query..
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
Explain sub-query?
How to truncate the log in sql server 2012? : sql server database administration
What is mssql?
What is the difference between locking and multi-versioning?
What is microsoft sql server?
What are drillthrough reports?
What is the full meaning of dml?
Tell me something about security and sql azure?
How to convert numeric expression data types by assignment operations?
Which joins are sql server default?
Can we perform backup restore operation on tempdb? : sql server database administration
How to use subqueries with the in operators in ms sql server?
What are the requirements on sql server network connections?
What is Dependency Injection and provide example?
What is the need for group functions in sql?