Skip to content Skip to sidebar Skip to footer

Syntax Error In Sql Create Table

Hi I am trying to get more familiat with SQL and I am using MySql to test my SQL queries.I seem to be getting a sintax error in this statement: CREATE TABLE dog ( id int(11) NOT

Solution 1:

try mentioning like this

CREATETABLE dog

(
  id intNOTNULL auto_increment,
  name varchar(255),
  descr text,
  size enum('small','medium','large'),
  datetimestamp,
  PRIMARY KEY (id)
)
ENGINE = InnoDB;

Solution 2:

'TIMESTAMP(14)' is deprecated; use 'TIMESTAMP' instead

Solution 3:

Try this :

CREATETABLE dog

(
  id intNOTNULL auto_increment PRIMARY KEY,
  name varchar(255),
  descr text,
  size enum('small','medium','large'),
  datetimestamp
)
ENGINE = InnoDB;

PRIMARY KEY statement has to be precised with the field declaration

Post a Comment for "Syntax Error In Sql Create Table"