分类: Mysql/postgreSQL
2015-04-22 12:33:44
更新该句
update punchcard_tbl
set percheck=3
where id in (select id punchcard where id=1)
在 MySQL 命令列工具中传回:
ERROR 1093 (HY000): You can't specify target table 'forum_members' for update in FROM clause
改成下列语句就可以解决无法更新的问题
update punchcard_tbl a
inner join punchcard_tbl b on b.id=1 and a.id=b.id
set a.percheck=3