

/****** Object:  Table [dbo].[EST_PED_ELTR_GRP_PED]    Script Date: 06/05/2014 20:00:07 ******/
IF  NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[EST_PED_ELTR_GRP_PED]') AND type in (N'U'))
	BEGIN

		CREATE TABLE [dbo].[EST_PED_ELTR_GRP_PED](
			[CD_EMP] [int] NOT NULL,
			[CD_GRP_PED] [int] NOT NULL,
			[DT_GRP_PED] [datetime] NULL,
			[STS_GRP_PED] [int] NULL,
			[CD_USU] [int] NULL,
			[DT_CAD] [datetime] NULL,
			[DS_GRP_PED] [varchar](100) NULL,
		 CONSTRAINT [PK_EST_PED_ELTR_GRP_PED] PRIMARY KEY CLUSTERED 
		(
			[CD_EMP] ASC,
			[CD_GRP_PED] ASC
		)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
		) ON [PRIMARY]



		SET ANSI_PADDING OFF


		ALTER TABLE [dbo].[EST_PED_ELTR_GRP_PED]  WITH CHECK ADD  CONSTRAINT [FK_EST_PED_ELTR_GRP_PED_GLB_USU] FOREIGN KEY([CD_USU])
		REFERENCES [dbo].[GLB_USU] ([CD_USU])
		ON UPDATE CASCADE


		ALTER TABLE [dbo].[EST_PED_ELTR_GRP_PED] CHECK CONSTRAINT [FK_EST_PED_ELTR_GRP_PED_GLB_USU]

	END

	