I am trying to use a clause OUTPUTinside a stored procedure to output indentation column values to a temporary table after INSERT.
CREATE TABLE
(
ID INT
)
INSERT INTO [TableB] OUTPUT INSERTED.ID
However, when I perform this procedure, SQL Server shows me the results in the table (correctly) under the name Test, but if I write SELECT * FROM #Testas the next statement in the stored procedure, it will not show me anything. How can I do this efficiently?
source
share