IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_CTB_EXP_MOV_CENTRO_CUSTO_CTB_EXP_MOV]'))
begin
	ALTER TABLE [dbo].[CTB_EXP_MOV_CENTRO_CUSTO] DROP CONSTRAINT [FK_CTB_EXP_MOV_CENTRO_CUSTO_CTB_EXP_MOV]
end
GO

ALTER TABLE [dbo].[CTB_EXP_MOV_CENTRO_CUSTO]  WITH CHECK ADD  CONSTRAINT [FK_CTB_EXP_MOV_CENTRO_CUSTO_CTB_EXP_MOV] FOREIGN KEY([CD_LANC])
REFERENCES [dbo].[CTB_EXP_MOV] ([CD_LANC])
ON DELETE CASCADE
GO

ALTER TABLE [dbo].[CTB_EXP_MOV_CENTRO_CUSTO] CHECK CONSTRAINT [FK_CTB_EXP_MOV_CENTRO_CUSTO_CTB_EXP_MOV]
GO


