执行以下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 - MYSQL截断了错误的DOUBLE值,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/3456258/