why NULL not error in new session?
Hi,
concerning @s_var1 variable, why in a new session there is an output NULL, not an error = "we don't have such a variable"? Was its name saved somewhere?
Regards
Margaret
1 answers ( 0 marked as helpful)
Hi Margaret!
Thanks for reaching out.
We cannot use this variable in another session because we defined it as a session variable. This is because it is NULL. There is no error, MySQL just displays NULL. You can test with another variable: @s_var2
and the result will be the same.
Hope this helps.
Best,
Tsvetelin