46 lines
1.5 KiB
SQL
46 lines
1.5 KiB
SQL
declare
|
|
object_exists exception;
|
|
except_02275 exception;
|
|
except_02270 exception;
|
|
except_02261 exception;
|
|
except_02260 exception;
|
|
|
|
pragma exception_init (object_exists , -01430);
|
|
pragma exception_init (except_02275 , -02275);
|
|
pragma exception_init (except_02270 , -02270);
|
|
pragma exception_init (except_02261 , -02261);
|
|
pragma exception_init (except_02260 , -02260);
|
|
begin
|
|
execute immediate 'ALTER TABLE ORGAO_COMPROVANTECUSTOMIZADO
|
|
ADD CONSTRAINT "PK_ORGAO_COMPROVANTECUSTOMIZADO" PRIMARY KEY ("ORGAOCOMPROVANTECUSTOMIZADO_ID")';
|
|
exception
|
|
when object_exists then null;
|
|
when except_02275 then null;
|
|
when except_02270 then null;
|
|
when except_02261 then null;
|
|
when except_02260 then null;
|
|
end;
|
|
/
|
|
declare
|
|
object_exists exception;
|
|
except_02275 exception;
|
|
except_02270 exception;
|
|
except_02261 exception;
|
|
except_02260 exception;
|
|
|
|
pragma exception_init (object_exists , -01430);
|
|
pragma exception_init (except_02275 , -02275);
|
|
pragma exception_init (except_02270 , -02270);
|
|
pragma exception_init (except_02261 , -02261);
|
|
pragma exception_init (except_02260 , -02260);
|
|
begin
|
|
execute immediate 'ALTER TABLE ORGAO_COMPROVANTECUSTOMIZADO
|
|
ADD CONSTRAINT "FK_COMPROVANTE_ORGAOCONCEDENTE" FOREIGN KEY (ORGAOCONCEDENTE_ID)
|
|
REFERENCES ORGAO_CONCEDENTE (ORGAOCONCEDENTE_ID)';
|
|
exception
|
|
when object_exists then null;
|
|
when except_02275 then null;
|
|
when except_02270 then null;
|
|
when except_02261 then null;
|
|
when except_02260 then null;
|
|
end; |