IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[EST_TRIB_CONF_GRP]')) 
	BEGIN 
		RETURN;
	END
ELSE
	BEGIN
		CREATE TABLE [dbo].[EST_TRIB_CONF_GRP](
			[CD_EMP] [int] NOT NULL,
			[CD_CTR] [int] NOT NULL,
			[DS_CONF_TRIB] [varchar](100) NOT NULL,
			[CD_REGIAO_FISCAL] [int] NOT NULL,
			[FLAG_TRIB_DARE] [int] NOT NULL,
			[CD_USU] [int] NOT NULL,
			[DT_CAD] DATETIME,
			[DT_ULT_ALT] DATETIME,
		 CONSTRAINT [PK_EST_TRIB_CONF_GRP] PRIMARY KEY CLUSTERED 
		(
			[CD_EMP] ASC,
			[CD_CTR] ASC
		)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
		) ON [PRIMARY]

		SET ANSI_PADDING OFF
		

		ALTER TABLE [dbo].[EST_TRIB_CONF_GRP]  WITH NOCHECK ADD  CONSTRAINT [FK_EST_TRIB_CONF_GRP_GLB_USU] FOREIGN KEY([CD_USU])
		REFERENCES [dbo].[GLB_USU] ([CD_USU])
		

		ALTER TABLE [dbo].[EST_TRIB_CONF_GRP] CHECK CONSTRAINT [FK_EST_TRIB_ALIQ_MVA_GLB_USU]
		

		ALTER TABLE [dbo].[EST_TRIB_CONF_GRP] ADD  CONSTRAINT [DF_EST_TRIB_CONF_GRP_CD_REGIAO_FISCAL]  DEFAULT ((0)) FOR [CD_REGIAO_FISCAL]
		

		ALTER TABLE [dbo].[EST_TRIB_CONF_GRP] ADD  CONSTRAINT [DF_EST_TRIB_CONF_GRP_FLAG_TRIB_DARE]  DEFAULT ((0)) FOR [FLAG_TRIB_DARE]
		
		
	END

