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 the difference between “Web.config” and “Machine.Config”?
Explain how dot net compiled code will become platform independent?
Which is an advantage of application service providers?
What is full form of asp.net?
What are cookies in your browser?
How does asp net store session ids by default?
What is the difference between pathparam and queryparam?
Apart from IDE what are the enhancements in asp.net 2.0?
Define view state.
Explain the advantages of caching?
What is cookieless session id explain in brief?
What is rich control in asp.net?
Which property needs to be set for script manager control to extend the time before throwing time out expection if no response is received from the server?
What is autopostback true?
How you can manage the state of application at the server side in ASP.NET?