Thursday, October 4, 2007

MS SQL server: Checking if a temporary table exists

if not object_id('tempdb..#test') is null
print 'exists'
else
print 'not exists'

No comments: