[英]Efficient way to check and insert data into MySQL database node
First Way: 第一种方式:
Second Way: 第二种方式:
Note: Inserting data will be very less compared to the database table data. 注意:与数据库表数据相比,插入数据要少得多。
Please suggest any best way to do it. 请提出任何最佳方法。
An implemetation of @NigelRen idea @NigelRen想法的实现
insert into destTable (id, coln,...)
select st.id,st.coln,...
from srcTable st
left join destTable dt on st.id=dt.id
where dt.id is null
where id
is the relation one-to-one between the two tables 其中
id
是两个表之间的一对一关系
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.