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

2018-10-24  本文已影响17人  raysonfang

批量插入

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

上一篇 下一篇

猜你喜欢

热点阅读