Assigning values to variables in your T-SQL code…both the SET statement and the SELECT statement are common ways to do this. However, are you aware that the behavior of these 2 statements is different? Depending on which statement you use your results could vary. So, rather than re-write the book on this topic I will just refer you to this good summary of the differences:
Although the SET statement is the ANSI standard, the SELECT statement does have its uses. In many cases you can use either method, but your coding should be different to account for the differences that can occur in the resulting assignment.