How to find the second largest salary in the emp database and
also How to find 3rd,4th and so on ........ in the emp database
plz mail the answer @ mak2786@gmail.com
Answer Posted / prashant narvekar
1. solution taken as std_id instead of salary
select max( b.std_id) from std_info a
inner join std_info b on a.std_id <> b.std_id
where a.std_id > b.std_id
2. solution
select max(std_id) from std_info
where std_id < ( select max(std_id) from std_info)
| Is This Answer Correct ? | 2 Yes | 5 No |
Post New Answer View All Answers
How will you make an attribute not process? : sql server analysis services, ssas
Which are ddl commands?
What is schemabinding a view?
Stored Procedure returns data from multiple tables. How to access it in your ASP.Net code?
Can we use having clause without group by?
Why and when do stored procedure recompile?
Explain features and concepts of analysis services?
System requirements for sql server 2005 express edition?
What is the difference between NOROW and LOCKROW?
What are built in functions?
What does top operator do?
Explain the difference between HTTP and HTTPS in database?
What are different replication agents and what's their purpose? : sql server replication
What is normalization of database?
What are dml triggers and types of dml triggers?