declare column_exists exception; pragma exception_init (column_exists , -01430); begin execute immediate 'ALTER TABLE ESTADO_CIVIL MODIFY (ESTADOCIVIL_ID NOT NULL)'; execute immediate 'ALTER TABLE ESTADO_CIVIL ADD CONSTRAINT ESTADO_CIVIL_PK PRIMARY KEY (ESTADOCIVIL_ID) ENABLE'; exception when others then null; end;