November 23, 2007 at 5:34 am
I have been asked to review a database and I have noticed that all the variables for the stored procedures are declared using @@, in every procedure. Looking at it I believe these should have been declared as local variables @.
I assume this adds some extra unnecessary overhead but can't seem to find out what the implecations might be. Can any one enlighten me?
November 23, 2007 at 6:05 am
The restriction for variables is that they start with @. They may contain @ later in their name. The extra @ does not change anything, the author may have used them to differentiate form the parameters.
In other words, whether you start a variable name with @ or @@ the result is the same, a local variable.
Regards,
Andras
November 23, 2007 at 6:20 am
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply