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 asp.net control toolkit?
How is application management and maintenance improved in asp.net 2.0?
Who can consume WebAPI?
How can we secure the data which is send from client side to server? Like the login id and paasword needs to be authenticated on the server but we cannot send it in plain text into the server.One more thing we are not using the SSL here.
What is cache in asp net?
What are the main requirements for caching?
Are xaml file compiled or built on runtime?
What is the difference between equals() and == in c#?
What is the difference between runtime version and version?
What is the difference between client-side and server-side validations in webpages?
What is session mode in asp.net?
What are the namespaces used in asp.net mvc? : asp.net mvc
Can you edit data in the Repeater control? Which template must you provide, in order to display data in a Repeater control? How can you provide an alternating color scheme in a Repeater control? What property must you set, and what method must you call in your code, in order to bind the data from some data source to the Repeater control?
What are the types of authentication in asp.net?
What is difference between mvc and asp.net? : Asp.Net MVC