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

What is the difference between “Web.config” and “Machine.Config”?

1133


Explain how dot net compiled code will become platform independent?

980


Which is an advantage of application service providers?

899


What is full form of asp.net?

1015


What are cookies in your browser?

990


How does asp net store session ids by default?

978


What is the difference between pathparam and queryparam?

1055


Apart from IDE what are the enhancements in asp.net 2.0?

2111


Define view state.

938


Explain the advantages of caching?

994


What is cookieless session id explain in brief?

1041


What is rich control in asp.net?

1020


Which property needs to be set for script manager control to extend the time before throwing time out expection if no response is received from the server?

960


What is autopostback true?

1062


How you can manage the state of application at the server side in ASP.NET?

1070