实验环境
搭建平台:VMware Workstation
OS:RHEL 6.10
Grid&DB:Oracle 11.2.0.4
SQL参考
with x as
(select /*+ materialize */ owner,name,type,line,text,rownum rn from dba_source where
(upper(text) like '%END%LOOP%' or upper(text) like '%FOR%LOOP%'))
select a.owner, a.name, a.type
from x a, x b
where ((upper(a.text) like '%END%LOOP%' and
upper(b.text) like '%END%LOOP%' and a.rn + 1 = b.rn) or
(upper(a.text) like '%FOR%LOOP%' and
upper(b.text) like '%FOR%LOOP%' and a.rn + 1 = b.rn))
and a.owner = b.owner
and a.name = b.name
and a.type = b.type
and a.owner = 'TEST'; --用户名
免责声明:本站发布的内容(图片、视频和文字)以原创、来自互联网转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:ts@56dr.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。
Copyright © 2009-2021 56dr.com. All Rights Reserved. 特网科技 版权所有 珠海市特网科技有限公司 粤ICP备16109289号
域名注册服务机构:阿里云计算有限公司(万网) 域名服务机构:烟台帝思普网络科技有限公司(DNSPod) CDN服务:阿里云计算有限公司 中国互联网举报中心 增值电信业务经营许可证B2