更新
:添加更多
Employee
和
ReplacementEmployee
表
员工
-
EmployeeId SerialNo
-----------------------------
1 11111
34 23233
23 13234
表
更换员工
-
ReplacementId SerialNo
-----------------------------
11 11111
23 23233
13 13234
所以当我在序列号上加入这些表的时候,有这样的东西
Mapping Table
-
EmployeeId ReplacementId
-----------------------------
1 11
34 23
23 13
所以现在我已经插入了表中的所有数据,就像这样
OrignalTable
它可以为EmployeeID提供多个值-
EmployeeId Name
-----------------------------
1 AAA
34 BBB
23 CCC
1 AAA
到一个具有不同模式的表中,基本上是这样的
InsertTable
它可以为EmployeeID提供多个值-
ReplacementId Name
-------------------------------
11 AAA
23 BBB
13 CCC
11 AAA
所以如果你看看这个问题,我需要
insert
从一个表到另一个表的数据,但我需要插入一个不同的字段,在这种情况下,我需要插入
corresponding
ReplacementId
而不是
EmployeeId
在新表中。那么,有人能建议我怎么写这样的问题吗?