Table Variable

Table variables  will store in temp db only. when the tempdb space is
full then it will create on memory.
It is not always true that table variable will create in memory.
see the test bellow
DECLARE @tablevar TABLE(col INT);
INSERT INTO @tablevar VALUES(1);
SELECT TABLE_NAME
FROM tempdb.INFORMATION_SCHEMA.TABLES
WHERE TABLE_NAME LIKE ‘%#%’;

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s