>Working on Temporary Tables @SQL Server

>– create test table named #test_temp
CREATE TABLE #test_temp(ad VARCHAR(10))
— insert some records to the #test_temp
INSERT INTO #test_temp(ad) VALUES(‘soykan’)
— get records from #test_temp
SELECT * FROM #test_temp
— drop table #test_temp
DROP TABLE #test_temp

if you want to create global temp table you should use ## before table name.

Advertisements

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s