Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

t-sql test if table exists

IF (EXISTS (SELECT * 
                 FROM INFORMATION_SCHEMA.TABLES 
                 WHERE TABLE_SCHEMA = 'TheSchema' 
                 AND  TABLE_NAME = 'TheTable'))
BEGIN
    --Do Stuff
END
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #test #table #exists
ADD COMMENT
Topic
Name
8+8 =