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
Describe a bubbled event and how it is used ?
Can one dll file contains the compiled code of more than one .net language?
What are the differences between primary foreign and unique keys?
Which platform does Microsoft .NET use for exchanging data between applications?
What is Cookies Less Session?
Explain what are webservices?
What are validator? Name the validation controls in asp.net?
What is session object? Describe in detail.
What are web beacons used for?
What are type/key pairs in client script registration? Can there be 2 scripts with the same type/key pair name?
What are the differences between the response.write() and response.output.write()?
Explain the difference between dataset and datareader.
Explain different types of Caching techniques in ASP.NET?
How ASP.NET page works?
Why is asp.net so popular?