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...

if i have 1000 records and i want to access 20 ata time
from SQL server, what will be the query?

Answer Posted / vijendra singh

Use The following Query for the problem...

Declare @PageIndex int
set @PageIndex=1
Declare @PageSize int
set @PageSize=20
while @PageIndex < 1000
begin
SELECT * FROM test WHERE ID between
@PageIndex and @PageIndex+@PageSize-1
set @PageIndex = @PageIndex + 20
end

Is This Answer Correct ?    13 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Describe a bubbled event and how it is used ?

1086


Can one dll file contains the compiled code of more than one .net language?

964


What are the differences between primary foreign and unique keys?

1025


Which platform does Microsoft .NET use for exchanging data between applications?

1000


What is Cookies Less Session?

1003


Explain what are webservices?

928


What are validator? Name the validation controls in asp.net?

973


What is session object? Describe in detail.

984


What are web beacons used for?

970


What are type/key pairs in client script registration? Can there be 2 scripts with the same type/key pair name?

910


What are the differences between the response.write() and response.output.write()?

970


Explain the difference between dataset and datareader.

963


Explain different types of Caching techniques in ASP.NET?

967


How ASP.NET page works?

1058


Why is asp.net so popular?

928