if object_id(N'tablename',N'U') is not null
drop table tablename
go
if exists (select * from sysobjects where id = object_id(N'[dbo].[tbname]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbname]
go
if object_id(N'tablename',N'U') is not null
drop table tablename
go
if exists (select * from sysobjects where id = object_id(N'[dbo].[tbname]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tbname]
go
转载于:https://www.cnblogs.com/something/p/3271912.html