In a stored proc, what would be the difference between the following statements?
SELECT cretvalue="string value"
and
SELECT @cretvalue="string value"
and
SELECT cretvalue as @cretvalue
The statements show up numerous times in stored procs that I am trying to debug. I know that '@cretvalue' refers to a local variable, but 'cretvalue' is never initialized anywhere in any of the sp's that I can see.