From a table do I want to select the first 4 rows after the first one. I had this in MySQL working as the following:
SELECT * FROM `yp_playlist` LIMIT 1, 4;
I have done some research to see the SQL Server version of this query and came out on the following but this keeps resulting me into an error which keeps me clueless for now.
SELECT id, entry
FROM (
SELECT id, entry, ROW_NUMBER() OVER (ORDER BY id) AS RowNum
FROM playlist
) AS MyDerivedTable
WHERE MyDerivedTable.RowNum BETWEEN 0 AND 10
This is the error:
There was an error parsing the query. [ Token line number = 3, Token line offset = 36, Token in error = OVER ]
With SQL Server Compact 4.0 you can use;