Site Search:
Sign in | Join | Help

SQL Server (T-SQL)

Comments and notes on SQL Server 2000, 2005, and T-SQL

How to tell if a temp table exists in SQL Server

Tested in SQL 2000 & 2005:

 IF OBJECT_ID('tempdb..#tmp') IS NOT NULL 
    PRINT 'exists.' 
ELSE 
    PRINT 'does not exist.'

Comments

No Comments