Search code examples
mysqlsyntax-errormysql-error-1064

HeidiSql - keep getting error 1064


I keep getting the error which appears in the following picture when I try to make a new table: enter image description here

Here is my code:

CREATE TABLE SalesKicker {
id INT(6) UNSIGNED AUTO_INCREMENT,
PRIMARY KEY(id),
BedrijfsName VARCHAR(30) NOT NULL,
ContPers VARCHAR(30) NOT NULL,
TelNum INT(20),
Plaats VARCHAR(30),
Land VARCHAR(30),
PostCode VARCHAR(30),
GebrDat TIMESTAMP
}

Can somebody tell me what I`m doing wrong here?


Solution

  • Use parenthesis, not curly braces. Also, do not forget the semi-colon at the end of your statement and put your key declarations at the end.

    CREATE TABLE SalesKicker (
      id INT(6) UNSIGNED AUTO_INCREMENT,
      BedrijfsName VARCHAR(30) NOT NULL,
      ContPers VARCHAR(30) NOT NULL,
      TelNum INT(20),
      Plaats VARCHAR(30),
      Land VARCHAR(30),
      PostCode VARCHAR(30),
      GebrDat TIMESTAMP,
      PRIMARY KEY(id)
    );