
/****** Object:  Table [dbo].[CTB_CNT_DRE_GLB_DESP_REC]    Script Date: 07/30/2012 15:46:16 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[CTB_CNT_DRE_GLB_DESP_REC](
	[CD_EMP] [int] NOT NULL,
	[CD_CNT_DRE] [int] NOT NULL,
	[CD_DESP_REC] [int] NOT NULL,
 CONSTRAINT [PK_CTB_CNT_DRE_GLB_DESP_REC] PRIMARY KEY CLUSTERED 
(
	[CD_EMP] ASC,
	[CD_CNT_DRE] ASC,
	[CD_DESP_REC] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

ALTER TABLE [dbo].[CTB_CNT_DRE_GLB_DESP_REC]  WITH CHECK ADD  CONSTRAINT [FK_CTB_CNT_DRE_GLB_DESP_REC_CTB_CNT_DRE] FOREIGN KEY([CD_EMP], [CD_CNT_DRE])
REFERENCES [dbo].[CTB_CNT_DRE] ([CD_EMP], [CD_CNT_DRE])
ON UPDATE CASCADE
ON DELETE CASCADE
GO

ALTER TABLE [dbo].[CTB_CNT_DRE_GLB_DESP_REC] CHECK CONSTRAINT [FK_CTB_CNT_DRE_GLB_DESP_REC_CTB_CNT_DRE]
GO

ALTER TABLE [dbo].[CTB_CNT_DRE_GLB_DESP_REC]  WITH CHECK ADD  CONSTRAINT [FK_CTB_CNT_DRE_GLB_DESP_REC_GLB_DESP_REC] FOREIGN KEY([CD_EMP], [CD_DESP_REC])
REFERENCES [dbo].[GLB_DESP_REC] ([CD_EMP], [CD_DESP_REC])
ON UPDATE CASCADE
GO

ALTER TABLE [dbo].[CTB_CNT_DRE_GLB_DESP_REC] CHECK CONSTRAINT [FK_CTB_CNT_DRE_GLB_DESP_REC_GLB_DESP_REC]
GO


