Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
HowTo: Release a Table variable
Message
From
13/01/2005 08:32:08
 
 
General information
Forum:
Microsoft SQL Server
Category:
Other
Miscellaneous
Thread ID:
00976391
Message ID:
00976723
Views:
20
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform