Please get the 4 th maximum salary from a table without
using any sql keyword (TOP,MAX are mot allowed)
Answer Posted / sumathy
Create Table 'Employee' with columns 'Emp_Name'
and 'Salary'. And, Insert some data.....
Cursor:
declare Cursor_Name cursor scroll
for select salary from Emploee order by salary desc
open Cursor_Name
fetch absolute 2 from Cursor_Name
deallocate Cursor_Name
| Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
Is it true, that there is no difference between a rule and a check constraint?
What are sql azure firewall rules?
there is a trigger defined for insert operations on a table, in an oltp system. The trigger is written to instantiate a com object and pass the newly inserted rows to it for some custom processing. What do you think of this implementation? Can this be implemented better? : Sql server database administration
What is replication and database mirroring?
What is precedence constraint?
Write a query for primary key constraint with identity key word?
Can we perform backup restore operation on tempdb? : sql server database administration
How we can refresh the view?
List out some of the requirements to set up a sql server failover cluster?
Do you know what is recursion? Is it possible for a stored procedure to call itself or recursive stored procedure?
Do you know what are the differences between lost updates and uncommitted dependencies?
Explain important index characteristics?
What is table-valued sub query?
How can you append an identity column to a temporary table?
What are the different types of collation sensitivity?