
IF NOT EXISTS
(
    SELECT 1
    FROM sys.tables
    WHERE NAME = 'RC_CONC_PDV_CUPOM_NAO_FISCAL_TEF_ENVIO_PENDENCIA'
)
    BEGIN
        CREATE TABLE RC_CONC_PDV_CUPOM_NAO_FISCAL_TEF_ENVIO_PENDENCIA
        (CD_EMP        INT NOT NULL,
         CD_CTR_LOTE   INT NOT NULL,
         CD_FILIAL     INT NOT NULL,
         CD_VD         INT NOT NULL,
         CD_CTR        INT NOT NULL,
         FLAG_RESPOSTA INT NULL,
         CONSTRAINT PK_RC_CONC_PDV_CUPOM_NAO_FISCAL_TEF_ENVIO_PENDENCIA PRIMARY KEY CLUSTERED(CD_EMP ASC, CD_CTR_LOTE ASC, CD_FILIAL ASC, CD_VD ASC, 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];
END;
GO
