哪个Oracle表使用序列? [英] Which Oracle table uses a sequence?

查看:287
本文介绍了哪个Oracle表使用序列?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有了一个序列,我需要找出哪个table.column获取它的值。据我所知,Oracle不跟踪这种关系。所以,查找源代码中的序列将是唯一的方法。是这样吗?

Having a sequence, I need to find out which table.column gets its values. As far as I know, Oracle doesn't keep track of this relationship. So, looking up for the sequence in source code would be the only way. Is that right?

任何人都知道一些方法来找出这个序列表关系?

Anyone knows of some way to find out this sequence-table relationship?

推荐答案

在数据库中,您可以搜索模式中所有存储的代码,如下所示:

In the database you can search all stored code in your schema like this:

select type, name, line, text
from all_source
where owner = 'MYSCHEMA'
and upper(text) like '%MYSEQ.NEXTVAL%';

在SQL Developer中,有一个报告。

In SQL Developer, there is a report to do this.

这篇关于哪个Oracle表使用序列?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆