IF NOT EXISTS (
    SELECT 1 
    FROM sys.objects 
    WHERE object_id = OBJECT_ID('dbo.EST_NFE_INF_EFET_PGTO_INTEG_EST_NF_ENT') 
      AND type = 'U'
)
BEGIN
    CREATE TABLE dbo.EST_NFE_INF_EFET_PGTO_INTEG_EST_NF_ENT (
        CD_CTR_INF_EFET_PGTO_INTEG INT NOT NULL,
        CD_EMP INT NOT NULL,
        CD_FILIAL INT NOT NULL,
        CD_NF INT NOT NULL,
        CONSTRAINT PK_EST_NFE_INF_EFET_PGTO_INTEG_EST_NF_ENT PRIMARY KEY (CD_CTR_INF_EFET_PGTO_INTEG, CD_EMP, CD_FILIAL, CD_NF)
    );
END;
GO
