find 2nd highest salary of person using cursor concept?

Answer Posted / amruta dash

select max(salary) from tbl where salary not in (select max
(salary) from tbl);

Is This Answer Correct ?    11 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I start sql server?

527


What are policy management terms?

553


Differentiate between SQL and ORACLE joins and write their syntax.

582


What is the stored procedure?

557


What will be the maximum number of index per table?

585






Does index speed up select statements?

579


How to add code to the existing article (using improve article)?

583


What are the differences between stored procedure and the dynamic sql?

571


How does clustered and non clustered index work?

511


Explain differentiate between a having clause and a where clause?

508


How to make remote connection in database?

590


How to define the name and server for a new dsn?

542


What are the transaction properties?

543


tell me what is blocking and how would you troubleshoot it? : Sql server database administration

481


Explain how to integrate the ssrs reports in application?

516