DECLARE @t TABLE
(
ID uniqueidentifier,
ID2 uniqueidentifier
)
...insert into @t ...do stuff to @t
INSERT INTO testTable (Id, Id2) VALUES (SELECT ID, ID2 from @t)
-does not work?
This is how you should do that:
INSERT INTO testTable (Id, Id2)
SELECT ID, ID2
from @t
这个怎么样?
INSERT INTO testTable SELECT ID, ID2 from @t
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.