
IF NOT EXISTS(SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='PRC_FILIAL_GRP_PERSONALIZAVEIS') 
BEGIN

	CREATE TABLE [dbo].[PRC_FILIAL_GRP_PERSONALIZAVEIS](
		[CD_CTR] [int] NOT NULL,
		[DS_GRP] [varchar](50) NOT NULL,
	 CONSTRAINT [PK_PRC_FILIAL_GRP_PERSONALIZAVEIS] PRIMARY KEY CLUSTERED 
	(
		[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],
	 CONSTRAINT [IX_PRC_FILIAL_GRP_PERSONALIZAVEIS] UNIQUE NONCLUSTERED 
	(
		[DS_GRP] 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]

	ALTER TABLE [dbo].[PRC_FILIAL_GRP_PERSONALIZAVEIS] ADD  CONSTRAINT [DF_PRC_FILIAL_GRP_PERSONALIZAVEIS_CD_CTR]  DEFAULT ((0)) FOR [CD_CTR]

END


