Answers for "if exists table in sql"

SQL
8

sql drop table if exists

DROP TABLE IF EXISTS dbo.Customers
Posted by: Guest on March-06-2020
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
1

sql drop table if exists

IF OBJECT_ID('dbo.Scores', 'U') IS NOT NULL 
  DROP TABLE dbo.Scores;
Posted by: Guest on October-27-2020

Code answers related to "SQL"

Browse Popular Code Answers by Language