UPDATE card SET value = (SELECT value FROM card WHERE id = 23) WHERE id = 20;
更新时 在where条件里面加入的子查询导致的。
解决方法:
UPDATE card SET value = (SELECT val FROM (SELECT value as val FROM card WHERE id = 23) as temp )WHERE id = 20;使用临时表。