I have three integers 7, 3, and 2.
I want to write a script that loops changing my variable each time then executing a SQL request using that changed variable for each changes variable. I am not sure how to do this.
I know how to declare a variable
declare @myvariable int;
set @myvariable = 7
select *
from mytable
where field1 = @myvariable
Please help