I have the following SQL statement:
SELECT [id], [name]
FROM [dbo.test_db_002] t1
LEFT JOIN [dbo.test_db_003] t2 ON t1.[id] = t2.[itmid]
ORDER BY t2.[iid] ASC;
This seems very simple, but I can't figure it out. I need to add LIMIT N,M
to it to retrieve M items from the N'th one, but I keep getting errors around 'limit' word. I tried putting that LIMIT
clause everywhere I could inside the sql statement above with no avail.
PS. I'm writing for SQL Server that comes with VS2010.