sql,把两个表中的两列数据合到一个表中

sql,把两个表中的两列数据合到一个表中


噜噜哒
浏览 1314回答 1
1回答

慕的地6264312

两个表的数据量一样的吗?合并后创建新表吗?需要借助辅助列select identity(int,1,1) as guid ,val into #1 from table1select identity(int,1,1) as guid ,val into #2 from table2select a.val as val1,b.val as val2 into table3from #1 a inner join #2 b on a.guid = b.guid
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

SQL Server