亚洲免费乱码视频,日韩 欧美 国产 动漫 一区,97在线观看免费视频播国产,中文字幕亚洲图片

      1. <legend id="ppnor"></legend>

      2. 
        
        <sup id="ppnor"><input id="ppnor"></input></sup>
        <s id="ppnor"></s>

        sql server 臨時表的刪除

        字號:


            1、錯誤的刪除操作:
            --錯誤的臨時表刪除操作,因為所在數(shù)據(jù)庫不同
            if exists (select * from sysobjects where object_id = object_id(n'[dbo].[#temptable]') and type in (n'u'))
            begin
            drop table [dbo].[temptable]
            end
            --錯誤的臨時表刪除操作,因為臨時表名已變
            if exists (select * from tempdb.dbo.sysobjects where id = object_id(n'[#temptable]'))
            begin
            drop table #temptable
            end
            2、正確的刪除方式:
            --正確的臨時表刪除操作
            if object_id('tempdb#temptable') is not null begin
            drop table #temptable
            end