如果是临时表,语句如下(#推柜订单 is table name)
IF OBJECT_ID(‘tempdb..#推柜订单’) is not null
drop table #推柜订单
go
如果是正常的表(月度推柜报表 is the table name)
if exists (select 1
from sysobjects
where id = object_id(‘月度推柜报表’)
and type = ‘U’)
drop table 月度推柜报表
go