I got simple SQL Server query:
SELECT TOP 100
[ID], [SUMMARY], [NAME]
FROM
[db_test].[dbschema].[dborders]
It works fine, and query 100 records from table, now for paging mechanism I need to get let's say 10 first records:
SELECT TOP 10
FROM
(SELECT TOP 100
[ID], [SUMMARY], [NAME]
FROM
[db_test].[dbschema].[dborders])
but I get an error:
Msg 156, Level 15, State 1, Line 1
Incorrect syntax near the keyword 'FROM'.
Please tell me what I'm doing wrong, or give me example of correct statement.