Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
HowTo: Release a Table variable
Message
De
13/01/2005 08:32:08
 
 
À
12/01/2005 18:03:18
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Divers
Thread ID:
00976391
Message ID:
00976723
Vues:
18
Hi Kevin,

Not sure on this but aren't variables scoped to the batch? If so and the batch is completed with a GO statement, wouldn't the variables be released? In that case, as long as his processes could be segregated he could "release" his variables this way. Yes-No?

Bill

>Fabio,
>
>I honestly do not have an answer as to "why" - whether it was an architectural issue, or something completely different.
>
>All I can tell you is that you cannot drop a table variable when it is no longer necessary. It simply goes out of scope when the proc completes.
>
>It seems you can do a DELETE FROM @tTableVar at any time, though I have no idea if that would have the desired effect on resource usage.
>
> Someone must tell me why not there is RELEASE @table.
>If I had implemented DECLARE @table TABLE,
>after a second I would have implemented RELEASE @Table.
>Simple very simple.

>
>I think it's simple/easy to say that... ;)
>
>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