gpt4 book ai didi

MySQL NULL 字段在 INSERT 时请求值

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

Mysql版本:5.7.x

查询:

INSERT INTO `products_manufacturer`
SET `website_id` = 27,
`name` = 'YAZAKI CORP',
`url` = 'http://www.speclocator.com/mfg_category.php?manufacturename=YAZAKI+CORP',
`enabled` = true,
`rectified_manufacturer_id` = NULL,
`logo` = NULL;

错误代码:1364。字段“facebook”没有默认值 0.000 秒

表结构附为屏幕截图。 DESC

最佳答案

插入数据后尝试以下查询

ALTER TABLE products_manufacturer MODIFY COLUMN facebook VARCHAR(255) NULL DEFAULT '0.000';

关于MySQL NULL 字段在 INSERT 时请求值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39204773/

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