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
What is a trigger and types of a trigger?
What is index fragmentation in ms sql server?
What are the default system databases in sql server 2000?
Can we call stored procedure in trigger?
What are the features of Embedded SQL
what's new in sql server 2016?
What is the difference between dataadapter and datareader?
What is the native system stored procedure to execute a command against all databases?
What is self contained multi valued query?
Can I work with several databases simultaneously? : sql server management studio
How to apply filtering criteria at group level with the having clause in ms sql server?
What are logical/boolean operations in ms sql server?
Explain triggers?
Can we delete data from a view?
Can group by and orderby be used together?