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 namespace to create thread in .net?

958


Difference between DataGid and Girdview? Difference b/w .Net 2.0, 3.0 and 3.5 ? Diff b/w dispose & Finialize Methods?

2482


What a diffgram is, and a good use for one?

1003


How u refer webservices?

1962


What are different types of api?

1022


What is the difference between exe and dll?

1142


Why is an object pool required?

1045


What is the main difference between Asp.net and Vb.net?

1058


Why is global asax is used for?

1101


What is sdlc process?

1000


What are the differnt types of handler in ASP.NET?

990


Why we are using mvc instead of asp.net? : Asp.Net MVC

1054


How to reduce the width of textbox in editcommandcolumn of datagrid?

1016


Explain what benefit does your code receive if you decorate it with attributes demanding specific security permissions?

1030


Explain the different types of assemblies?

970