insert into
// insert into ... onduplicate key update 重复则执行update 为mysql特性语法
insert into table(col1,col2,...) values(val1-1,val1-2,...),(val2-1,val2-2),...
on duplicate key
update (col1,...) = values(col1,...) // 复制插入value中的列 其他列不变
(或者 update (col1,...) = col1+val0 // 在原值基础上加上val0)
// replace into 重复则删除再插入
replace into tabletable(col1,col2,...) values(val1-1,val1-2,...),(val2-1,val2-2),...
select from where not exists
select ...
from ...
where not exists( select 1 from ....)
and ...