gpt4 book ai didi

MYSQL 截断了不正确的 DOUBLE 值

转载 作者:行者123 更新时间:2023-11-29 15:46:13 25 4
gpt4 key购买 nike

当执行下面的 SQL 查询时:

UPDATE shop_category 
SET name = 'Secolul XVI - XVIII'
AND name_eng = '16th to 18th centuries'
WHERE category_id = 4768

出现以下错误:

1292 - Truncated incorrect DOUBLE value: 'Secolul XVI - XVIII'

如何解决这个问题?

<小时/>

shop_category表结构:

category_id   mediumint(8)
name varchar(250)
name_eng varchar(250)

最佳答案

您不需要 AND 关键字。这是correct syntax of the UPDATE statement :

UPDATE 
shop_category
SET
name = 'Secolul XVI - XVIII',
name_eng = '16th to 18th centuries'
WHERE
category_id = 4768

关于MYSQL 截断了不正确的 DOUBLE 值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57016657/

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