insert product(field1,field2...)
select b.field1,b.field2... from product a,product2 b
where a.id=b.id and a.section<>b.section and
a.id in (select id from product group by id having(count(*)=1)
如果两表结构一样:
insert product select * from ......where...
select b.field1,b.field2... from product a,product2 b
where a.id=b.id and a.section<>b.section and
a.id in (select id from product group by id having(count(*)=1)
如果两表结构一样:
insert product select * from ......where...
select b.field1,b.field2... from product a,product2 b
where a.id=b.id and a.section<>b.section and
a.id in (select id from product group by id having(count(*)=1)
如果两表结构一样:
insert product select b.* from ......where...