17,082
社区成员
发帖
与我相关
我的任务
分享
insert into cim_erp_address (customer_id,address_type,id_fragment,modify_date)
select t.customer_id,2,'N','2007-10-15 10:31:24' from cim_customer t
where not exists(select 1 from cim_erp_address a where t.customer_id=a.customer_id);
insert into cim_erp_address (customer_id,address_type,id_fragment,modify_date)
-- values (( -- 这个 values 不要
select t.customer_id from cim_customer t
where t.customer_id not in (select a.customer_id from cim_erp_address a)),2,'N','2007-10-15 10:31:24');