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
What is full trust in asp.net?
Am not able to move the controls on the form freely in asp.net 3.5 even though I selected the position as relative or absolute for those controls. What should I do to overcome this?
What do you mean by serialize and marshalbyref?
State differences between MVC and WebAPI
How to use a Master Database in Asp.net?
what are the web form events available in asp.net?
What websites use asp.net?
What is the difference between table and query?
Difference between response.redirect and server.transfer?
Describe the sequence of action takes place on the server when ASP.NET application starts first time?
What is asp.net futures?
What is the difference between adding reference in solution explorer and adding references by using ?
What is the use of dispose method?
How is my content secured from unauthorized access?
What is the function of new view engine in asp.net? : asp.net mvc