📜  sql server 检查临时表是否存在 - SQL 代码示例

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

代码示例3
IF OBJECT_ID('tempdb..#Results') IS NOT NULL
    Truncate TABLE #Results
else
    CREATE TABLE #Results
    (
        Company             CHAR(3),
        StepId              TINYINT,
        FieldId             TINYINT,
    )