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
When does the auto update index statistics feature in sql server turn itself on?q) what specific conditions database should meet, before you can bulk copy data into it using bcp?
Tell me what is a linked server?
What is an expression in ms sql server?
What are different replication agents and what's their purpose? : sql server replication
When I run the sql server 2000 setup, it just hangs. What do I do?
How do I create a stored procedure in dbml?
As a general practice, it is recommended to have dbo be the owner of all database objects however, in your database you find number of tables owned by a user other than dbo, how could you fix this?
What is a trigger and types of a trigger?
How to connect php with different port numbers?
How to delete multiple rows with one delete statement in ms sql server?
What are sql server functions?
What do you mean by SQL injection attack?
Why use update_statistics command in sql server?
how many no of arguments can be passed in procedures and functions
how can you attach more than 20 ldf files in sql server