Professional Documents
Culture Documents
Tablas
Tablas
(a in material.id_material%type,b in material.descripcion%type,
c in material.categoria%type,d in material.año%type)
is
cant number;
begin
cant:=0;
select count(*) into cant from material where id_material = a;
if cant=0 then
insert into material values (a,b,c,d);
end if;
exception
when others then dbms_output.put_line('Error algo salió mal');
end;
if cant=0 then
insert into designamiento values (a,b,c,d);
end if;
exception
when others then dbms_output.put_line('Error algo salió mal');
end;
if cant=0 then
insert into ambientes values (a,b,c,d);
end if;
exception
when others then dbms_output.put_line('Error algo salió mal');
end;