declare column_exists exception; pragma exception_init (column_exists , -01430); begin execute immediate 'ALTER TABLE PTOVTA_COMISSAO ADD (SEGUROOBRIGATORIOALTA NUMBER(5,2), SEGUROOBRIGATORIOBAIXA NUMBER(5,2))'; exception when column_exists then null; end; / declare begin execute immediate 'UPDATE PTOVTA_COMISSAO SET SEGUROOBRIGATORIOALTA = PASSAGEMALTA, SEGUROOBRIGATORIOBAIXA = PASSAGEMBAIXA WHERE SEGURORECEITA = 1'; exception when others then null; end;