📜  t-sql 测试表是否存在 - SQL 代码示例

📅  最后修改于: 2022-03-11 15:05:10.308000             🧑  作者: Mango

代码示例1
IF (EXISTS (SELECT * 
                 FROM INFORMATION_SCHEMA.TABLES 
                 WHERE TABLE_SCHEMA = 'TheSchema' 
                 AND  TABLE_NAME = 'TheTable'))
BEGIN
    --Do Stuff
END