
IF  EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[EST_TRIB_CONF_EST_GRP_NCM]') AND name = N'PK_EST_TRIB_CONF_EST_GRP_NCM')
ALTER TABLE [dbo].[EST_TRIB_CONF_EST_GRP_NCM] DROP CONSTRAINT [PK_EST_TRIB_CONF_EST_GRP_NCM]
GO

ALTER TABLE EST_TRIB_CONF_EST_GRP_NCM ALTER COLUMN NR_NCM  VARCHAR(50) NOT NULL
GO

ALTER TABLE [dbo].[EST_TRIB_CONF_EST_GRP_NCM] ADD  CONSTRAINT [PK_EST_TRIB_CONF_EST_GRP_NCM] PRIMARY KEY CLUSTERED 
(
	[CD_EMP] ASC,
	[CD_CTR] ASC,
	[NR_NCM] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
GO

