2016-03-03 42 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 
);