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 what are the events recorded in a transaction log?
what is datawarehouse?
What is BLOCK statements in SQL?
What is unpivot?
Can another user execute your local temporary stored procedures?
Explain what are the different index configurations a table can have?
Can coalesce return null?
How to optimize stored procedure optimization?
What are the advantages of passing name-value pairs as parameters?
Write a SQL command to insert and update only a particular field?
Explain DBCC?
Define left outer join?
What is the tcp/ip port on which sql server runs?
application server is slow what may be the problem
What are null values in ms sql server?