报错:

ERROR 1093 (HY000): You can't specify target table 'message' for update in FROM clause

原sql:

update user_invite set level=2 where parent_id in (select user_info_id from user_invite where level=1);

需要加个临时表解决:

update user_invite set level=2 where parent_id in (select user_info_id from (select user_info_id from user_invite where level=1) as puid);

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

Captcha Code