美文网首页
sql(从一张表插入另一张)批量插入和批量更新

sql(从一张表插入另一张)批量插入和批量更新

作者: raysonfang | 来源:发表于2018-10-24 11:35 被阅读17次

批量插入

INSERT INTO table_name1 (xxx,xxx,xxx,xxx) SELECT xxx,xxx,xxx,xxxx from table_name2 where

批量更新

update table1 a,(select xxx,xxx from table2 b INNER JOIN table3 c on c.xxx= b.xxx where c.xxx IS NULL) as d set a.xxx = d.xxx where d.xxx= a.xxx

相关文章

网友评论

      本文标题:sql(从一张表插入另一张)批量插入和批量更新

      本文链接:https://www.haomeiwen.com/subject/jsmttqtx.html