ulwitch
Programmer
- Aug 24, 2001
- 22
When do you use Set to assign a value to a variable, and when do you use Select?
Set @var1 = 50
or
Select @var1 = 50
What if you need to result of a query, like this one:
Select @var1 = count(*) from table1
Set @var1 = 50
or
Select @var1 = 50
What if you need to result of a query, like this one:
Select @var1 = count(*) from table1