- 物理表
IF OBJECT_ID('dbo.Scores', 'U') IS NOT NULL DROP TABLE dbo.Scores;
- 临时表
IF OBJECT_ID('tempdb.dbo.#T', 'U') IS NOT NULL DROP TABLE #T;
- SQL Server 2016 新加功能
DROP TABLE IF EXISTS dbo.Scores
IF OBJECT_ID('dbo.Scores', 'U') IS NOT NULL DROP TABLE dbo.Scores;
IF OBJECT_ID('tempdb.dbo.#T', 'U') IS NOT NULL DROP TABLE #T;
DROP TABLE IF EXISTS dbo.Scores
转载于:https://www.cnblogs.com/bi-info/p/6278756.html