delete users from users u left join blog b on u.id=b.uid where b.id is NULL;
出错:ERROR 1109 (42S02): Unknown table 'users' in MULTI DELETE
改为:
delete u from users u left join blog b on u.id=b.uid where b.id is NULL;
一旦用了别名,就要用别名用到底
多表联合删除,详细知识点参考:https://www.cnblogs.com/sunss/archive/2011/01/20/1940306.html