Check if a temp table exists (TSQL)

if object_id('##temp_table') is null print 'DOES NOT EXIST' else print 'EXISTS'

No comments: