我想在SQL-Server中的单个命令中执行以下操作:
https://msdn.microsoft.com/en-us/library/ms177564.aspx
我可以做1和2, 喜欢
DELETE p
OUTPUT deleted.*
INTO Table2
FROM Table1 p
我想做的是如下
DECLARE @tempTable TABLE
(
ID int
)
DELETE p
OUTPUT deleted.*
INTO Table2
OUTPUT INSERTED.ID
INTO @tempTable
FROM Table1 p
是否可以在一个命令中执行此操作?