Why am I getting this error when I have already declared it?
--Run the entire script in one go
DECLARE @Actions TABLE (ActionId uniqueidentifier)
--Grab actionid @Actions and insert into the variable table @Actions
INSERT INTO @Actions
Where Actionid in ('1F29300C-6059-4402-AB17-AB2D01674568', '5303D037-F50F-4E71-91F9-30BBC0993E68')
--Returns the 2 IDs as expected
--Now delete the 2 Ids from the @Actions Variable table
WHERE ActionId = @Actions
--I get error here when I go to delete the 2 Ids in the variable table
'Msg 137, Level 16, State 1, Line 3
Must declare the scalar variable "@Actions"..