MySQL join高级用法

MySQL的join语句用的很多,比如和字典进行联查时,可以用left join或者inner join;

两张MySQL表:

t1:

   

t2:

join进行update

update t1 inner join t2 on t1.a = t2.a set t1.b =t2.c where 1=1;

join进行delete

delete t1,t2 from t1 inner join t2 on t1.a=t2.a where 1=1 ;

 

posted @ 2024-07-29 16:07  HexThinking  阅读(7)  评论(0编辑  收藏  举报