Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

sql server drop table if exists

-- Classic table
IF OBJECT_ID('my_schema.my_table', 'U') IS NOT NULL DROP TABLE my_schema.my_table; 
-- Temporary table
IF OBJECT_ID('tempdb.my_schema.#my_table') IS NOT NULL DROP TABLE #my_table; 
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #sql #server #drop #table #exists
ADD COMMENT
Topic
Name
4+8 =