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

Which .NET framework supports Web API?

598


Explain the difference between singleton and single call?

534


What is in a session cookie?

542


Why do we need a web application session?

510


What is meant by web application?

543






Where can I get information on cookies in asp.net?

567


explain code with multi inhertance

1651


How to manage different kinds of sessions in ASP.NET?

565


What is the maximum timeout we can set for Cookies?

553


Define satellite assemblies.

586


Explain the asp.net mvc request life cycle? : asp.net mvc

506


How can we make sure that Web API returns JSON data only?

543


Is LINQ performance wise better or using sqlcommand?

4337


What is slidemaster?

468


What is session management in web application?

553