连接是什么意思?table1(col1,col2) table2(col3,col4) 变成table3(col1,col2,col3,col4)??如果是这样alter table table1 add id int identity(1,1) ---添加标识列给两个table加上关联 alter table table2 add id int identity(1,1)select a.col1,a.col2,b.col3,b.col4 into table3 from table1 a,table2 b where a.id=b.idalter table table1 drop column id --删除标识列 alter table table2 drop column id
table2(col3,col4)
变成table3(col1,col2,col3,col4)??如果是这样alter table table1 add id int identity(1,1) ---添加标识列给两个table加上关联
alter table table2 add id int identity(1,1)select a.col1,a.col2,b.col3,b.col4 into table3
from table1 a,table2 b
where a.id=b.idalter table table1 drop column id --删除标识列
alter table table2 drop column id