I'm trying to create a table in the database. I use VS 2017. I get an error that I can’t just write CREATE TABLE Case
Error SQL80001: Incorrect syntax around "Case". Expected '.', ID or QUOTED_ID.dbo.Table 1
I just need to name the table with the name Case, but VS does not allow me to do this even through properties.
CREATE TABLE Case ( [CaseID] INT NOT NULL PRIMARY KEY IDENTITY, [Name] NVARCHAR(100) NOT NULL, [Description] NVARCHAR(500) NOT NULL, [Category] NVARCHAR(50) NOT NULL, [Price] DECIMAL(16, 2) NOT NULL );
Caseis a keyword in SQL, so quotes are needed, apparently. - D-side