Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
HowTo: Release a Table variable
Message
De
14/01/2005 13:38:54
 
 
À
13/01/2005 16:48:51
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Divers
Thread ID:
00976391
Message ID:
00977313
Vues:
27
Ok, thanks kevin. Good info to keep in mind. This has been a profitable thread.

Bill

>To wrap this up (hopefully!), I received a few responses from SQL MVPs from one of the SQL newsgroups.
>
>The consensus was that no one expected variables could be scoped in a BEGIN...END block (yet also acknowledged that BOL indicates otherwise). One person stated he might contact MS about this.
>
>The general recommendation (no surprise) was to declare local variables at the top of the procedure.
>
>In addition to Bonnie's test, someone also demonstrated that declaring the same local variable inside two different BEGIN...END blocks generated an error that the variable had already been declared.
>
>So it seems that variables inside a BEGIN...END block are created regardless. At the very least (IMHO), the docs could be a little clearer about this, and should more consistently state the actual scope.
>
>Kevin
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform