find 2nd highest salary of person using cursor concept?

Answer Posted / manju

DECLARE authors_salary CURSOR
select top2(salary) from tb_employee order by desc salary

open author_salary
FETCH NEXT FROM authors_salary into @topsalary

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the difference between control flow and data flow?

524


How do you manipulate data?

485


List out some of the requirements to set up a sql server failover cluster?

541


Tell me what is the order in which the sql query is executed?

519


Which is the main third-party tool used in sql server?

472






What is the difference between truncate and delete commands?

561


Introduction of rollup clause using sum and group by clause?

530


What is schemabinding a view?

518


What are the advantages dts has over bcp?

524


Why should you use or avoid select * statements?

571


What is field with example?

511


How to list all login names on the ms sql server?

533


can a database be shrunk to 0 bytes, if not, why? : Sql server administration

600


How can you list all the table constraints in a database?

504


What is the largest component inside a field?

525