IF Exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK_Over_Under_Row_DrugHavaleh]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[Over_Under_Row] DROP CONSTRAINT FK_Over_Under_Row_DrugHavaleh

IF Exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK_Tmp_Over_Under_Row_TmpDrugHavaleh]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[Tmp_Over_Under_Row] DROP CONSTRAINT FK_Tmp_Over_Under_Row_TmpDrugHavaleh

IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_Tmp_Over_Under_Row_TmpHavaleh]') AND parent_object_id = OBJECT_ID(N'[dbo].[Tmp_Over_Under_Row]'))
ALTER TABLE [dbo].[Tmp_Over_Under_Row] DROP CONSTRAINT [FK_Tmp_Over_Under_Row_TmpHavaleh]

IF Exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK_Over_Under_Row_Havaleh]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[Over_Under_Row] DROP CONSTRAINT FK_Over_Under_Row_Havaleh


