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
Give an example of SQL injection attack ?
Tell me in brief how sql server enhances scalability of the database system?
What are .mdf files?
What is page in sql server?
What information is maintained within the msdb database?
What does this statement do @@rowcount?
How to connect sql server management studio express to sql server 2005 express?
What is an example of a foreign key?
What is the purpose of sql profiler in sql server? : sql server database administration
What purpose does the model database server?
What are commonly used odbc functions in php?
How to generate random numbers with the rand() function in ms sql server?
what is normalization? : Sql server database administration
Explain nested join?
How do you rename a table in sql server?