[英]Create table in MySQL Workbench
My problem is I'm trying to create a simple table with MySQL Workbench however when I execute the generated script it throws me the following error: 我的问题是我试图用MySQL Workbench创建一个简单的表,但是当我执行生成的脚本时,它会引发以下错误:
Operation failed: There was an error while applying the SQL script to the database.
Executing:
CREATE TABLE `new_schema`.`new_table` (
`idnew_table` INT NOT NULL AUTO_INCREMENT COMMENT '',
PRIMARY KEY (`idnew_table`) COMMENT '');
ERROR 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 'COMMENT '')' at line 3
SQL Statement:
CREATE TABLE `new_schema`.`new_table` (
`idnew_table` INT NOT NULL AUTO_INCREMENT COMMENT '',
PRIMARY KEY (`idnew_table`) COMMENT '')
ERROR 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 'COMMENT '')' at line 3
SQL Statement:
CREATE TABLE `new_schema`.`new_table` (
`idnew_table` INT NOT NULL AUTO_INCREMENT COMMENT '',
PRIMARY KEY (`idnew_table`) COMMENT '')
Your CREATE TABLE
syntax is wrong. 您的CREATE TABLE
语法错误。 If you are not actually adding a comment no need to include that. 如果您实际上并未添加评论,则无需添加评论。
CREATE TABLE `new_schema`.`new_table` (
`idnew_table` INT NOT NULL AUTO_INCREMENT PRIMARY KEY COMMENT ''
)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.