1. 程式人生 > >mysql修改Truncated incorrect DOUBLE value:

mysql修改Truncated incorrect DOUBLE value:

class date ted pan min var nco medium upd

UPDATE shop_category 
SET name = ‘Secolul XVI - XVIII‘ 
    AND name_eng = ‘16th to 18th centuries‘ 
WHERE category_id = 4768
category_id   mediumint(8)
name        varchar(250)
name_eng      varchar(250)

執行報錯

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

問題原因,update不應該用and,修改sql語句為

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

mysql修改Truncated incorrect DOUBLE value: