需求:现在需要进行表连接进行删除和修改多张表的一些字段
表1,t_user,表2 ,t_users,表3,t_file
1.进行修改:
假设根据id进行关联
update t_user t1
left join t_users t2 on t1.id = t2.id
left join t_file t3 on t1.id = t3.id
set t1.id= 886
t2.id = 886
t3.id = 886
where t1.1d = 456;
2.删除
delete t1,t2,t3
from t_user t1
left join t_users t2 on t1.id = t2.id
left join t_file t3 on t1.id = t3.id
where id = 34143;