IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[RC_CLI_CONV_RC_CLI_CONV_BLOQ_LIBERA_CATGO]') AND TYPE IN (N'U'))
BEGIN
	DROP TABLE RC_CLI_CONV_RC_CLI_CONV_BLOQ_LIBERA_CATGO
END
GO

IF  NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[RC_CLI_CONV_RC_CLI_CONV_BLOQ_LIBERA_CATEG]') AND TYPE IN (N'U'))
BEGIN
	CREATE TABLE [DBO].[RC_CLI_CONV_RC_CLI_CONV_BLOQ_LIBERA_CATEG](
		CD_EMP         INT NOT NULL,
		CD_CONV        INT NOT NULL,
		CD_CTR         INT NOT NULL,
		CD_PLANO_VENDA INT NOT NULL,
		CONSTRAINT PK_RC_CLI_CONV_RC_CLI_CONV_BLOQ_LIBERA_CATEG PRIMARY KEY (CD_EMP, CD_CONV, CD_CTR, CD_PLANO_VENDA)
	) ON [PRIMARY] 
END

GO