批量插入
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
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
网友评论