Variables in T-SQL behave differently from what people may be
used to in languages like C or C#. The scope of a variable is the batch in
which it is declared. This may not be intuitive to people who are used to local
variables. So let’s look at
Read More