create table secom.secom_obj_relation(
obj_name varchar2(100)
,p_obj_name varchar2(100)
)
PROCEDURE secom_obj_relation(p_objname varchar2 )
is
--待核销的SO
cursor c_obj is
select name
from DBA_DEPENDENCIES ddr
where ddr.referenced_name = p_objname --'SECOM_SERVICE_REGISTERS'
and ddr.type='VIEW';
begin
FOR c_obj_r IN c_obj LOOP
insert into secom.secom_obj_relation(obj_name,p_obj_name) values(c_obj_r.name,p_objname);
table_relation(c_obj_r.name);
end loop;
end secom_obj_relation;