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 ); 
  • 3
    And also Case is a keyword in SQL, so quotes are needed, apparently. - D-side
  • 3
    MySQL or MSSQL? MySQL is specified in the question, using the syntax MSSQL. - Yaant
  • Oh, I did not know. Thank you, but I put it so CREATE TABLE "Case" - Alex.Jad

0