sql表的列将被明确地插入到另一个表中

时间:2017-06-16 18:43:15

标签: sql-server

我正在使用sql R2服务器。我想,sql表的列是要插入到另一个表行。像下面的东西。请帮帮我。对不起,我的英语不太合适。我在这里附上了截图。

这是我的表:

Customer id     Member Code     Account Type

C000100000003   A0001000000003  SB

000100000007    R0001000000001  SB

C000100000010   R0001000000001  SB

C000100000007   R0001000000002  SB

我希望用这样的格式

Customer id     Member Code     Account Type     Customer id     Member Code    Account Type    Customer id     Member Code     Account Type

C000100000003   A0001000000003  SB               C000100000003   A0001000000003  SB              C000100000003   A0001000000003   SB     

000100000007    R0001000000001  SB               C000100000003   A0001000000003  SB              C000100000003   A0001000000003   SB     

C000100000010   R0001000000001  SB               C000100000003   A0001000000003  SB              C000100000003   A0001000000003   SB     

C000100000007   R0001000000002  SB               C000100000003   A0001000000003  SB              C000100000003   A0001000000003   SB     

谢谢

1 个答案:

答案 0 :(得分:1)

SELECT *
INTO myNewTable
FROM myOldTable