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
Where does the copy job runs in the log shipping primary or secondary? : sql server database administration
How many categories of data types used by sql server?
What is the difference between truncate and delete commands?
how many type of indexing in database?
What is a coalesce function?
Should you normalize audio?
Define magic tables in sql server?
Comment,Datatypes are unlimited
Explain difference between cross join and full outer join?
What is xml datatype?
Is ssrs support other database except ms sql server?
How do I find query history in sql server?
Explain “row_number()” in sql server with an example?
Once setting replication, can you have distributor on sql server 2005, publisher of sql server 2008?
How do database indexes work?