DECLARE @t TABLE
(
ID uniqueidentifier,
ID2 uniqueidentifier
)
...插入@t ...做的东西@t
INSERT INTO testTable (Id, Id2) VALUES (SELECT ID, ID2 from @t)
-不工作?
DECLARE @t TABLE
(
ID uniqueidentifier,
ID2 uniqueidentifier
)
...插入@t ...做的东西@t
INSERT INTO testTable (Id, Id2) VALUES (SELECT ID, ID2 from @t)
-不工作?
这是你应该怎么做:
INSERT INTO testTable (Id, Id2)
SELECT ID, ID2
from @t
这个怎么样?
INSERT INTO testTable SELECT ID, ID2 from @t