通过什么来关联啊 一般是update b set column1=b.column1 from b bwhere column2=b.column2
一般是update a set column1=b.column1 from b bwhere column2=b.column2
insert B(b) select a from A
insert into B(b) select a from A
insert into B(b) select a from A
insert into B(b) select a from A
支持小楼的写法insert B(b) select a from A
alter table A add id int identity(1,1) alter table B add id int identity(1,1)update B set b=A.a from B,A where A.id=B.idalter table A drop column id alter table B drop column id
--将a表中信息更新到b表 update b set b.InActive = c.InActive from (select InActive from a) c --将a表中信息添加到b表 insert b(groups) select groups from a
一般是update b set column1=b.column1 from b bwhere column2=b.column2
select a from A
alter table B add id int identity(1,1)update B set b=A.a
from B,A
where A.id=B.idalter table A drop column id
alter table B drop column id
update b
set b.InActive = c.InActive
from (select InActive from a) c
--将a表中信息添加到b表
insert b(groups) select groups from a