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

Explain different types of Caching techniques in ASP.NET?

756


Is it possible to develop a single web application using ASP.NET webforms and ASP.MVC?

832


What is state management in .net?

838


How can we identify that the page is post back in asp net?

700


How can you register a custom server control to a web page?

771


Less than one page, how many windows will you be able to maintain?

788


Can action method static?

773


What is the use of session?

721


What are the asp.net list controls and difference between them?

761


How to create events for a control?

791


Explain the flow of processing of the request? : asp.net mvc

744


What is the maximum number of classes that can be contained in one dll file?

968


How we implement the multiple paypal value with gridview in my website and how we make a payment through Credit Card.

1696


Explain Optimization technique description?

827


What kind of programming language is ASP.NET?

851