I am trying to build a SQL Database Project, which was created in Visual Studio, in Azure DevOps build pipeline. However, when I build the database project, I get the following error:
Error SQL46010: Incorrect syntax near OPTIMIZE_FOR_SEQUENTIAL_KEY
I am currently exporting script from SSMS 18, and importing them into my Visual Studio project. The current 'Target Platform' is set to 'Azure SQL Database'.
Note: The script which has the OPTIMIZE_FOR_SEQUENTIAL_KEY is part of my CREATE script as follows:
CREATE TABLE [Table1](
[Id] [bigint] IDENTITY(1,1) NOT NULL,
[VALUE1] [bigint] NOT NULL
CONSTRAINT [ID] PRIMARY KEY CLUSTERED
(
[Id] ASC
)WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [Table1] WITH CHECK ADD CONSTRAINT [Table2FK] FOREIGN KEY([Table2FKID])
REFERENCES [Table2])
GO
Also, the following is the compatibility level as shown in SSMS:
I would really appreciate any help. Thank you.
