#1064 - 您的SQL语法中有一个错误,用于编码新数据库

时间:2022-06-01 17:42:15

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 5

1064 - 您的SQL语法出错;检查与您的MySQL服务器版本相对应的手册,以便在第5行附近的')'附近使用正确的语法

The code is:

代码是:

CREATE TABLE click_count (
     id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
     page_url VARCHAR(255) NOT NULL,
     page_count INT UNSIGNED NOT NULL,
);

1 个解决方案

#1


Remove the trailing comma before the closing parenthesis:

在右括号前删除尾随逗号:

CREATE TABLE click_count (
    id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
    page_url VARCHAR(255) NOT NULL,
    page_count INT UNSIGNED NOT NULL
);

#1


Remove the trailing comma before the closing parenthesis:

在右括号前删除尾随逗号:

CREATE TABLE click_count (
    id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
    page_url VARCHAR(255) NOT NULL,
    page_count INT UNSIGNED NOT NULL
);