 
IF OBJECT_ID('RC_DEB_PAG_CHEQUE', 'U') IS  NULL
BEGIN

    
    CREATE TABLE RC_DEB_PAG_CHEQUE
    (
        CD_CTR 			INT IDENTITY(1,1) NOT NULL, 
        PAG_CD_CTR 		INT NULL,
        CPF 			VARCHAR(15) COLLATE SQL_LATIN1_GENERAL_CP1_CI_AS NULL,
        CMC7 			VARCHAR(35) COLLATE SQL_LATIN1_GENERAL_CP1_CI_AS NULL,
        DT_CHEQUE 		DATETIME   NULL,
        DT_VENCTO 		DATETIME   NOT NULL,
        ANO_CHQ 		VARCHAR(4)  COLLATE SQL_LATIN1_GENERAL_CP1_CI_AS NOT NULL,
        MES_ANO_CNT_CHQ VARCHAR(7)  COLLATE SQL_LATIN1_GENERAL_CP1_CI_AS NULL,
        CONSTRAINT PK_RC_DEB_PAG_CHEQUE 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) ON [PRIMARY]
    )ON [PRIMARY]

    ALTER TABLE RC_DEB_PAG_CHEQUE  WITH CHECK ADD  CONSTRAINT FK_RC_DEB_PAG_CHEQUE_RC_DEB_PAG FOREIGN KEY(PAG_CD_CTR) REFERENCES RC_DEB_PAG (CD_CTR)
	ALTER TABLE RC_DEB_PAG_CHEQUE CHECK CONSTRAINT FK_RC_DEB_PAG_CHEQUE_RC_DEB_PAG;

END

    
