find 2nd highest salary of person using cursor concept?
Answer Posted / pawan
select * from emp a where 2=(select count(distinct(sal)) from emp b where a.sal<=b.sal);
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How to loop through result set objects using mssql_fetch_array()?
In case you have filters in your report, when filters will be applied in cached report instance?
What is 'Join' and explain its various types.
Why SQL Agent is used?
what is the difference between writing data to mirrored drives versus raid5 drives. : Sql server administration
What are key constraints?
Do you know what is a trace frag? Where do we use it?
What is clustered index
What is save transaction and save point?
How to drop existing views from a database in ms sql server?
List out the differences between the clustered index and non-clustered index in sql server?
What are the difference between “where” and “having” clause in sql server?
What are truncate options available in sql server? : sql server database administration
State the difference between local and global temporary tables?
explain declarative management framework (dmf) in sql server 2008?