gpt4 book ai didi

mysql - 插入值时出现错误 1064

转载 作者:行者123 更新时间:2023-11-29 19:26:27 27 4
gpt4 key购买 nike

create table Eaddress (
employeeid varchar(10),
building varchar(10),
street varchar(10),
city char(10),
district varchar(10),
state char(10),
phoneno int(10),
primary key(employeeid)
);

insert into Eaddress('P0001','N21','Avenue 12','NYC','D21','New York',6965269);

ERROR 1064 (42000): 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 ''P0001','N21','Avenue 12','NYC','D21','New York',6965269)' at line 1

我对这个错误感到困惑。我尝试更改值并更改列的数据类型,但没有任何效果。

最佳答案

尝试使用这个语法

insert into Eaddress 
values ('P0001','N21','Avenue 12','NYC','D21','New York', 6965269);

关于mysql - 插入值时出现错误 1064,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42096359/

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