I want to item 1 to 50 in my first page by using
SELECT TOP(50) *
FROM Items_table
and it works fine but how can I get second 50 items for next page? How should be the query be?
Please note that I can't use LIMIT
because I am using SQL Server.
I have also problem with queries like:
select *
from (
select
ROW_NUMBER() over (
ORDER BY date_of_creation desc, time_of_creation desc) AS Row2,
*
from
Items_table) ir
where
ir.Row2 between @start and @end
The problem is in this condition table adapter doesn't support OVER
.
Is there any other t-sql code that table adapter support?