多表修改和多表删除

多表修改:

  update t_user u 

  inner join t_student s

  on s.u_id=u.id

  set u.password='zhangsan1243',s.teacher='hehe'

  where u.card='zhangsan123';

多表删除:

  delete u,t from t_user u

  inner join t_student s

  on s.u_id=u.id

  where u.card='zhangsan123';

原文地址:https://www.cnblogs.com/kongnengjing/p/9452520.html