adspace


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


Please Help Members By Posting Answers For Below Questions

what is spatial nonclustered index

1066


How efficient you are in oracle and SQL server?

1269


List out the different types of locks available in sql server?

1058


What are the kinds of subquery?

1118


explain different types of backups avaialabe in sql server? Given a particular scenario, how would you go about choosing a backup plan? : Sql server database administration

1139


What are different types of constraints?

1007


Can sql servers link to other servers like oracle?

928


What is self contained sub query?

1148


Where can you add custom error messages to sql server?

1220


What are the properties of the transaction?

1084


What is the difference between upgrade and migration in sql server?

1193


what is the difference between openrowset and openquery?

1208


What is clustered index

1094


Disadvantages of the indexes?

1232


How do I find query history in sql server?

1034