SQL语句中的语法错误" INSERT INTO

时间:2017-12-28 20:46:17

标签: mysql spring spring-boot

我在Spring Boot应用程序上的import.sql文件有问题,但我无法弄清楚错误的位置。我在控制台上出现以下错误:

2017-12-28 18:31:24.496[0;39m [31mERROR[0;39m [35m10866[0;39m [2m--
-[0;39m [2m[  restartedMain][0;39m 
[36morg.hibernate.tool.hbm2ddl.SchemaExport [0;39m [2m:[0;39m HHH000388: 
Unsuccessful: insert into convidado (id, nome, quantidade_acompanhantes)
[2m2017-12-28 18:31:24.496[0;39m [31mERROR[0;39m [35m10866[0;39m [2m--
-[0;39m [2m[  restartedMain][0;39m 
[36morg.hibernate.tool.hbm2ddl.SchemaExport [0;39m [2m:[0;39m Syntax 
error in SQL statement "INSERT INTO CONVIDADO (ID, NOME, 
QUANTIDADE_ACOMPANHANTES) [*]"; expected "DIRECT, SORTED, DEFAULT, VALUES, 
SET, (, WITH, SELECT, FROM"; SQL statement:
insert into convidado (id, nome, quantidade_acompanhantes) [42001-196]

1 个答案:

答案 0 :(得分:0)

INSERT语句用于将新行添加到数据库表中。

语法:

INSERT INTO table_name (Column 1, column 2)
VALUES (value 1, value2)

INSERT

的示例
INSERT INTO student (id, name, age)
VALUES (1, 'harry', 22);