2016-03-03 52 views
1

为了能够使用大写字母创建表,我不得不修改ProgramData\MySQL\MySQL Server 5.7中的my.ini文件,U在文件末尾添加了lower_case_table_names = 2建议here,当我关闭MySQL服务器并重新启动它无法创建任何新表,所以我删除我增加了行,再次重新启动服务器,我一直有这个错误MySql - 更改my.ini后无法创建新表(windows)

Operation failed: There was an error while applying the SQL script to the database. 
Executing: 
CREATE TABLE `toys`.`new_table` (
); 

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 ')' at line 2 
SQL Statement: 
CREATE TABLE `toys`.`new_table` (
) 

回答

1

您不能创建一个表没有列 - 你需要在括号内的东西。例如:

CREATE TABLE `toys`.`new_table` (
    id INT -- just for example 
);