
GO

/****** Object:  Table [dbo].[EST_TRIB_CONF_INTER_DAR_NCM]    Script Date: 4/18/2013 7:59:07 AM ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[EST_TRIB_CONF_INTER_DAR_NCM](
	[CD_EMP] [int] NOT NULL,
	[CD_CTR] [int] NOT NULL,
	[NR_NCM] [varchar](50) NOT NULL,
 CONSTRAINT [PK_EST_TRIB_CONF_INTER_DAR_NCM] PRIMARY KEY CLUSTERED 
(
	[CD_EMP] ASC,
	[CD_CTR] ASC,
	[NR_NCM] 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

SET ANSI_PADDING OFF
GO

ALTER TABLE [dbo].[EST_TRIB_CONF_INTER_DAR_NCM] ADD  CONSTRAINT [DF_EST_TRIB_CONF_INTER_DAR_NCM_CD_EMP]  DEFAULT ((0)) FOR [CD_EMP]
GO

ALTER TABLE [dbo].[EST_TRIB_CONF_INTER_DAR_NCM] ADD  CONSTRAINT [DF_EST_TRIB_CONF_INTER_DAR_NCM_CD_CTR]  DEFAULT ((0)) FOR [CD_CTR]
GO

ALTER TABLE [dbo].[EST_TRIB_CONF_INTER_DAR_NCM] ADD  CONSTRAINT [DF_EST_TRIB_CONF_INTER_DAR_NCM_NR_NCM]  DEFAULT ((0)) FOR [NR_NCM]
GO

ALTER TABLE [dbo].[EST_TRIB_CONF_INTER_DAR_NCM]  WITH CHECK ADD  CONSTRAINT [FK_EST_TRIB_CONF_INTER_DAR_NCM_EST_TRIB_CONF_INTER_DAR] FOREIGN KEY([CD_EMP], [CD_CTR])
REFERENCES [dbo].[EST_TRIB_CONF_INTER_DAR] ([CD_EMP], [CD_CTR])
GO

ALTER TABLE [dbo].[EST_TRIB_CONF_INTER_DAR_NCM] CHECK CONSTRAINT [FK_EST_TRIB_CONF_INTER_DAR_NCM_EST_TRIB_CONF_INTER_DAR]
GO


