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 parameters can you pass in the url of the api? Can get and post use the same url?

993


Can you explain architecture of your project ?

1133


Explain an object, class and method.

1003


Which is faster viewbag or viewdata?

966


What are the security types in ASP/ASP.NET? Different Authentication modes?

1053


Is data edited in the Repeater control?

1043


What is session id in web application?

1098


What is a web api?

1059


Define xmlvalidatingreader class.

1090


what are configuration files?

1043


What do you mean by query string?

941


How can we implement a identity (sql server) call in an asp.net page?

1024


Explain the different types of directives in .net?

947


How do I send an email message from my ASP.NET page?

960


Explain the asp.net session state modes.

1071