sql,把两个表中的两列数据合到一个表中
1 回答
慕的地6264312
TA贡献1817条经验 获得超6个赞
两个表的数据量一样的吗?
合并后创建新表吗?
需要借助辅助列
select identity(int,1,1) as guid ,val into #1 from table1
select identity(int,1,1) as guid ,val into #2 from table2
select a.val as val1,b.val as val2 into table3
from #1 a inner join #2 b on a.guid = b.guid
- 1 回答
- 0 关注
- 1313 浏览
添加回答
举报
0/150
提交
取消