I use
Insert into table
select (col_name)
from another
For example :
insert into table1(salary)
select salary
from table2
If (variable=700)
Begin
Insert .......
End
Can I declare a variable and let the value of it equals the salary
While select row number 1 , the value is the salary in row 1
while selecting row number 2 , the value of the variable is the salary in row number 2
And so on?