 
IF  EXISTS (SELECT * FROM sys.foreign_keys 
				WHERE object_id = OBJECT_ID(N'[dbo].[FK_EST_PROD_TRANSF_LACRE_IT_EST_PROD_TRANSF_LACRE]') 
					  AND parent_object_id = OBJECT_ID(N'[dbo].[EST_PROD_TRANSF_LACRE_IT]'))
	BEGIN
		RETURN
	END
	
	ALTER TABLE [dbo].[EST_PROD_TRANSF_LACRE_IT]  WITH CHECK ADD  CONSTRAINT [FK_EST_PROD_TRANSF_LACRE_IT_EST_PROD_TRANSF_LACRE] FOREIGN KEY([CD_EMP], [CD_FILIAL], [CD_CTR], [CD_LACRE])
	REFERENCES [dbo].[EST_PROD_TRANSF_LACRE] ([CD_EMP], [CD_FILIAL], [CD_CTR], [CD_LACRE])
	ON UPDATE CASCADE
	ON DELETE CASCADE
	GO
	
	ALTER TABLE [dbo].[EST_PROD_TRANSF_LACRE_IT] CHECK CONSTRAINT [FK_EST_PROD_TRANSF_LACRE_IT_EST_PROD_TRANSF_LACRE]
	GO
	
GO
	
