标签:
--表
if exists (select * from dbo.sysobjects where id = object_id(N‘[monthly_budget_work]‘) and OBJECTPROPERTY(id, N‘IsUserTable‘) = 1)
drop table [monthly_budget_work]
GO
--函数
if exists (select * from dbo.sysobjects where id = object_id(N‘[dbo].[fn_all_date_in_term]‘) and xtype in (N‘FN‘, N‘IF‘, N‘TF‘))
drop function [dbo].[fn_all_date_in_term]
GO
--View
if exists (select * from dbo.sysobjects where id = object_id(N‘[dbo].[view_loss]‘) and OBJECTPROPERTY(id, N‘IsView‘) = 1)
drop view [dbo].[view_loss]
GO
--Trigger
if exists (select * from dbo.sysobjects where id = object_id(N‘[dbo].[InsertTrigger_postrn]‘) and OBJECTPROPERTY(id, N‘IsTrigger‘) = 1)
drop trigger [dbo].[InsertTrigger_postrn]
GO
--SP
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N‘[dbo].[sp_download_sales_for_hojinkan]‘) AND type in (N‘P‘, N‘PC‘))
DROP PROCEDURE [dbo].[sp_download_sales_for_hojinkan]
GO
--synonyms
IF EXISTS (SELECT * FROM sys.synonyms WHERE name = N‘FEP_kbn_manage‘)
DROP SYNONYM [dbo].[FEP_kbn_manage]
GO
--assemblies
IF EXISTS (SELECT * FROM sys.assemblies asms WHERE asms.name = N‘SqlServerDebug‘)
DROP ASSEMBLY [SqlServerDebug]
GO
标签:
原文地址:http://www.cnblogs.com/puxian/p/4587250.html