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 are the disadvantages of primary key and foreign key in SQL?
Explain few examples of stored procedure over triggers?
What purpose does the model database server?
What is the purpose of indexing?
What are three major types of constraints?
How do I find the sql server instance name?
What is the difference between createstatement and preparedstatement?
What is SQL Azure?
How many columns can we include on clustered index ?
What are trace flags?
Can you import Microsoft Excel data to SSRS?
What stored by the model? : sql server database administration
Why I am getting this error when renaming a database in ms sql server?
Mention the differences between substr and charindex in sql server.
What is parameterized reports in ssrs ?