
IF EXISTS ( SELECT OBJECT_NAME(PARENT_OBJECT_ID)  
			  FROM SYS.FOREIGN_KEYS 
			 WHERE NAME = 'FK_EST_PROD_PRECO_PMPF_CPL_EAN' 
			   AND OBJECT_NAME(REFERENCED_OBJECT_ID) = 'EST_PROD_CD_BARRA'
			   AND OBJECT_NAME(PARENT_OBJECT_ID)  = 'EST_PROD_PRECO_PMPF_CPL'
			 )
BEGIN
	ALTER TABLE  EST_PROD_PRECO_PMPF_CPL DROP CONSTRAINT FK_EST_PROD_PRECO_PMPF_CPL_EAN
END 