BEGIN
   UPDATE IMPREGRAFISCAL
      SET IDIMPOBRIGREGRA = 'S'
    WHERE IDIMPOBRIGREGRA= 'Y';

   COMMIT;
END;
/

ALTER TABLE IMPREGRAFISCAL ADD CONSTRAINT CKC_IDIMPOBRIGREGRA CHECK (IDIMPOBRIGREGRA IN ('S','N'))
/