I can:
declare @idOrder int
set @idOrder = 21319
I want:
declare @idOrder int
set @idOrder = (21319, 21320)
You can't do that as long as it's an int
, as that's not a valid value for that datatype. A datatype that could take several integers is a table
declare @idOrder table (id int)
insert into @idOrder values(21319)
insert into @idOrder values(21320)
delete from Orders where idOrder in (select id from @idOrder)