IF OBJECT_ID('GLB_EMAIL_ENV_ANEXO') IS NULL
	BEGIN
		CREATE TABLE [dbo].[GLB_EMAIL_ENV_ANEXO](
			[CD_CTR] [int] NOT NULL,
			[CD_ANEXO] [int] NOT NULL,
			[DS_ANEXO] [nvarchar](100) NULL,
			[ARQ_ANEXO] [varbinary](max) NULL,
		 CONSTRAINT [PK_GLB_EMAIL_ENV_ANEXO] PRIMARY KEY CLUSTERED 
		(
			[CD_CTR] ASC,
			[CD_ANEXO] ASC
		)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
		) ON [PRIMARY]

		ALTER TABLE [dbo].[GLB_EMAIL_ENV_ANEXO]  WITH CHECK ADD  CONSTRAINT [FK_GLB_EMAIL_ENV_ANEXO_GLB_EMAIL_ENV] FOREIGN KEY([CD_CTR])
		REFERENCES [dbo].[GLB_EMAIL_ENV] ([CD_CTR])
		ON UPDATE CASCADE
		ON DELETE CASCADE
		 
		ALTER TABLE [dbo].[GLB_EMAIL_ENV_ANEXO] CHECK CONSTRAINT [FK_GLB_EMAIL_ENV_ANEXO_GLB_EMAIL_ENV] 

	END
	