gpt4 book ai didi

mysql - 在部门表中插入值

转载 作者:行者123 更新时间:2023-11-30 00:46:37 25 4
gpt4 key购买 nike

将值插入表部门时出现以下错误

#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 'Hr.Kadim,1234.43)' at line 2

INSERT INTO department (dept_name,building,budget)
VALUES (Comp.Sci.,Hr.Kadim,1234.43);

最佳答案

插入时需要添加带有字符串值的单引号

INSERT INTO department (dept_name,building,budget) VALUES ('Comp.Sci.','Hr.Kadim',1234.43);

关于mysql - 在部门表中插入值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21313791/

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