IF OBJECT_ID('CG_FND_VERBA_BLOQUEIO') IS NULL
BEGIN
CREATE TABLE [dbo].[CG_FND_VERBA_BLOQUEIO](
	[CD_EMP] [int] NOT NULL,
	[CD_FND_VERBA] [int] NOT NULL,
	[CD_USU] [int] NOT NULL,
	[DT_BLOQUEIO] [date] NOT NULL,
	[HR_BLOQUEIO] [datetime] NOT NULL,
 CONSTRAINT [PK_CG_FND_VERBA_BLOQUEIO] PRIMARY KEY CLUSTERED 
(
	[CD_EMP] ASC,
	[CD_FND_VERBA] 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].[CG_FND_VERBA_BLOQUEIO]  WITH CHECK ADD  CONSTRAINT [FK_CG_FND_VERBA_BLOQUEIO_CG_FND_VERBA] FOREIGN KEY([CD_FND_VERBA], [CD_EMP])
REFERENCES [dbo].[CG_FND_VERBA] ([CD_FND_VERBA], [CD_EMP])

ALTER TABLE [dbo].[CG_FND_VERBA_BLOQUEIO] CHECK CONSTRAINT [FK_CG_FND_VERBA_BLOQUEIO_CG_FND_VERBA]
END

