if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[yourTableName]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table [dbo].[yourTableName] GO
if exists (select * from sysobjects where id = object_id('dbo.T_PCMSDET_INV_D') and sysstat & 0xf = 8) drop trigger dbo.T_PCMSDET_INV_D GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[yourTableName]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table [dbo].[yourTableName] GO
if exists (select name from sysobjects where name='[yourTableName]') and type ='U') drop table [yourTableName] GO
监测 表bg : if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[bg]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)监测 存储过程bg : if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[bg]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
if exists(select 1 from sysobjects where name='表名' and xtype='u') drop table 表名
drop trigger dbo.T_PCMSDET_INV_D
GO
drop table [dbo].[yourTableName]
GO
drop table [yourTableName]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[bg]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)监测 存储过程bg :
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[bg]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop table 表名