嗨,如果名字是 harpo,姓氏是 Williamns,我想将名字更改为 grouocho,其他虎钳我想更改为名字是 Harpo 的 Mocho Groucho。当我运行我的代码时,它给了我
Error 1175 You are using safe update mode and you tried to
update a table without a WHERE that uses a KEY column
任何人都可以帮助我吗?
UPDATE actor
SET first_name =
CASE
WHEN first_name = 'HARPO' AND last_name = 'Williams' THEN 'GROUCHO'
WHEN first_name = 'HARPO' AND last_name != 'Williams' THEN 'MOCHO GROUCHO'
END
;