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
What is a document index?
What are the fixed server level roles? : sql server security
 Explain what is sql override for a source taLle in a mapping?
Explain go command in sql server?
code to create procedure for taking databse backup in sql server or i have the query for it but what it's query returns means i want to show on my jsp that the databse backup has been taken on the basis of that return value.does it returns 0 or 1.wat is the code for that
What is rank function?
How to return the top 5 rows from a select query in ms sql server?
What are cursors? Explain different types of cursors. What are the disadvantages of cursors? How can you avoid cursors?
What specific conditions database should meet, before you can bulk copy data into it using bcp?
What is raiseerror? What is raiseerror?
Mention what are the core components of ssrs?
Create and insert into temp table in sql server?
Explain difference between cross join and full outer join?
Which data types generate inaccurate results if used with an = or <> comparison in a where clause of a sql statement?
What are functions in the sql server?