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
List the data types available in mssql?
How can we get count of the number of records in a table?
Can you always create a cache of a report?
What are the different types of backups that exist?
How to invoke a trigger on demand?
Define synonym?
What is the difference between cartesian product and cross join?
Explain “@@rowcount” and “@@error” in sql server?
What is usually the first word in a sql query?
What is an indexing strategy?
What is the recursive stored procedure in sql server?
What is analysis service repository?
What is index in an assignment?
What is fill factor and pad index?
What is a data source or ds? : sql server analysis services, ssas