34,837
社区成员




update B
set col1 = A.col1,
col2 = A.col2
from B,A where B.id = A.id
insert into .... select .... from .... where ....
insert into .... select .... from .... where ....
update B
set col1 = A.col1,
col2 = A.col2
from B,A where B.id = A.id
select * into 历史表 from 信息表 where 信息表.时间 between '' and ''--无历史表
insert into 历史表 select * from 信息表 where 信息表.时间 between '' and ''--有历史表
表结构不一样加字段插入