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 / rasbeer

Declare @PageIndex int
set @PageIndex=2

select top 20 * from
(select top 20 * from
(select top (@PageIndex*20) * from chat_contents order by
id ) as a1
order by id desc)as b1 order by id

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the page life cycle in asp.net?

967


how to elimainte the similar data from the different tables

2164


What is state management technique?

1022


What is application and session in asp.net?

952


Explain exception handling in .net.

1066


What are merge modules?

1015


What is the state management in asp.net?

1018


Which protocol is used to call a web service?

1050


How can you make sure that web api returns json data only?

979


Explain how cookies work.

1045


Explain the page lifecycle of an asp.net mvc? : asp.net mvc

872


What is http request and response?

1013


What is asp.net file?

1185


Explain the difference between mvc (model-view-controller) and mvp (model-view-presenter)? : asp.net mvc

971


What is the significance of attaching a profile while creating a user?

1036