Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Write a sql query to sort on different column name according to the parameters passed in the function?

851


To automatically record the time on which the data was modified in a table, which data type should you choose for the column?

886


Why SQL Agent is used?

1064


What is the difference between deallocate cursor and close cursor?

1164


What is store procedure?

1002


List all types of constraints in sql server?

960


what is a transaction and what are acid properties? : Sql server database administration

962


What are the various Operating system files that every SQL server 2005 database has and what is the purpose.

1002


Explain how many types of relationship?

971


explain how to create a new schema in a database? : Sql server database administration

1055


What the difference between UNION and UNIONALL?

984


Write the queries for commands like Create Table, Delete table, Drop Table etc.

1024


Why we need sql server?

909


What are the indexes in sql server?

1018


What is an expensive query?

877