it is possible to store data into temp table without creating temp table.
this way we can do it. select * into #tmp1 from sourcetable
so when we store OUTPUT Results into temp table then is it possible to do it without creating temp table.
see a example
DECLARE @Updated table( [DepartmentID] int,
[Name] varchar(50),
[GroupName_old] varchar(50),
[GroupName_new] varchar(50),
[ModifiedDate_old] datetime,
[ModifiedDate_new] datetime);
Update [Department_SRC]
Set [GroupName]='IT',
ModifiedDate=Getdate()
OUTPUT deleted.DepartmentID, deleted.Name, deleted.GroupName as GroupName_old,
inserted.GroupName as GroupName_new, deleted.ModifiedDate as ModifiedDate_old,
inserted.ModifiedDate as ModifiedDate_new
INTO @Updated
Where [Name]='Engineering'
--Querying from @Updated output table
Select * from @Updated
in this example first create table variable and then store data there. i like to store data into temp table from OUTPUT resultset without creating temp table. if it is possible then please show me the approach. thanks