Sql server 创建,删除临时表

//创建临时表
 CREATE TABLE #temp_ellist
   (
     id int identity(1,1),
     elID INT,
     elName VARCHAR(500),
     acount int,
     scount int
   )
 
--删除表临时表
     IF EXISTS (select * from tempdb.dbo.sysobjects where id = object_id(N'tempdb..#temp_ellist') and type='U')
     DROP TABLE #temp_ellist 

 

 

注意:临时表名

posted @ 2021-01-28 07:33  qingjiawen  阅读(714)  评论(0编辑  收藏  举报