Answers for ""IF EXISTS (SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'user_table') BEGIN PRINT 'Database Table Exists' END","

SQL
5

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
Posted by: Guest on March-05-2020

Code answers related to ""IF EXISTS (SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'user_table') BEGIN PRINT 'Database Table Exists' END","

Code answers related to "SQL"

Browse Popular Code Answers by Language