本文介绍了MYSQL截断了错误的DOUBLE值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当执行下面的SQL查询时:
When the SQL query below is executed:
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
关键字.这是UPDATE语句的正确的语法:
You don't need the AND
keyword. Here's the 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值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!