Check the database compatibility level. OFFSET was added in SQL Server 2012, so if your database is in 2008 compatibility mode, this keyword is not available.
View or change the database compatibility level
In T-SQL, you can check it like this:
USE AdventureWorks2012; GO SELECT compatibility_level FROM sys.databases WHERE name = 'AdventureWorks2012'; GO
The following is a list of compatibility levels taken from How to check SQL Server database compatibility after sp_dbcmptlevel is deprecated? :
65 - SQL Server 6.5 70 - SQL Server 7.0 80 - SQL Server 2000 90 - SQL Server 2005 100 - SQL Server 2008/R2 110 - SQL Server 2012 120 - SQL Server 2014 130 - SQL Server 2016 140 - SQL Server 2017
source share