gpt4 book ai didi

mysql - SQL 语句中的语法错误“INSERT INTO

转载 作者:行者123 更新时间:2023-11-29 18:04:28 25 4
gpt4 key购买 nike

我在 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]

最佳答案

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

语法:

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

INSERT 示例:

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

关于mysql - SQL 语句中的语法错误“INSERT INTO,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48014158/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com