Oracle数据库中SP和表之间的关系
oracle中sp和表之间的关系
sp-table
select t1.owner as powner,t1.name as pname
,case when t1.referenced_owner in ('sapcrdb','sapirdb') then t1.referenced_owner else t2.owner end as towner
,t1.referenced_name as tname
from all_dependencies t1
inner join all_tables t2
on t1.referenced_name=t2.table_name
where t1.type = 'procedure'
and t1.owner in ('sapcrdb','sapirdb')
and case when t1.referenced_owner in ('sapcrdb','sapirdb') then t1.referenced_owner else t2.owner end = t2.owner
and t1.referenced_type in ('table','view','synonym')
and t1.name='sap_ag_atc'
and t2.temporary='n'
sp-sp
select t1.owner as powner,t1.name as pname
,case when t1.referenced_owner in ('sapcrdb','sapirdb') then t1.referenced_owner else t2.owner end as towner
,t1.referenced_name as tname
from all_dependencies t1
inner join all_objects t2
on t1.referenced_name=t2.object_name
where t1.type = 'procedure'
and t1.owner in ('sapcrdb','sapirdb')
and case when t1.referenced_owner in ('sapcrdb','sapirdb') then t1.referenced_owner else t2.owner end = t2.owner
and t1.referenced_type in ('procedure','synonym')
and t2.object_type='procedure'
and t1.name='sap_ag_etl_01';
上一篇: 鼻子够灵的
下一篇: Linux任务调度(8)
推荐阅读
-
PowerDesigner 建立与数据库的连接以便生成数据库和从数据库生成到PD中(Oracle 10G版)
-
Oracle中 关于数据库存储过程和存储函数的使用
-
Oracle中的Connect/session和process的区别及关系介绍
-
Django中ORM外键和表的关系详解
-
PowerDesigner 建立与数据库的连接以便生成数据库和从数据库生成到PD中(Oracle 10G版)
-
Oracle中如何把表和索引放在不同的表空间里
-
解析如何查看Oracle数据库中某张表的字段个数
-
sqlserver中delete、update中使用表别名和oracle的区别
-
数据库中两张表之间的数据同步增加、删除与更新实现思路
-
SQL Server数据库中的表和视图怎么导出?