标签:使用 ar sp bs sql as mysql table 方法
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;
使用临时表。
mysql - Error Code: 1093. You can't specify target table
标签:使用 ar sp bs sql as mysql table 方法
原文地址:http://www.cnblogs.com/shouwangzhe-/p/4024316.html