1. <legend id='BvXCZ'><style id='BvXCZ'><dir id='BvXCZ'><q id='BvXCZ'></q></dir></style></legend>

    <small id='BvXCZ'></small><noframes id='BvXCZ'>

  2. <i id='BvXCZ'><tr id='BvXCZ'><dt id='BvXCZ'><q id='BvXCZ'><span id='BvXCZ'><b id='BvXCZ'><form id='BvXCZ'><ins id='BvXCZ'></ins><ul id='BvXCZ'></ul><sub id='BvXCZ'></sub></form><legend id='BvXCZ'></legend><bdo id='BvXCZ'><pre id='BvXCZ'><center id='BvXCZ'></center></pre></bdo></b><th id='BvXCZ'></th></span></q></dt></tr></i><div id='BvXCZ'><tfoot id='BvXCZ'></tfoot><dl id='BvXCZ'><fieldset id='BvXCZ'></fieldset></dl></div>

      <tfoot id='BvXCZ'></tfoot>
        <bdo id='BvXCZ'></bdo><ul id='BvXCZ'></ul>

      如何在 Oracle SQL Developer 中找到哪些表引用了给定的表?

      时间:2023-09-19
        <tfoot id='9O90L'></tfoot>
      1. <legend id='9O90L'><style id='9O90L'><dir id='9O90L'><q id='9O90L'></q></dir></style></legend>

        <small id='9O90L'></small><noframes id='9O90L'>

            <i id='9O90L'><tr id='9O90L'><dt id='9O90L'><q id='9O90L'><span id='9O90L'><b id='9O90L'><form id='9O90L'><ins id='9O90L'></ins><ul id='9O90L'></ul><sub id='9O90L'></sub></form><legend id='9O90L'></legend><bdo id='9O90L'><pre id='9O90L'><center id='9O90L'></center></pre></bdo></b><th id='9O90L'></th></span></q></dt></tr></i><div id='9O90L'><tfoot id='9O90L'></tfoot><dl id='9O90L'><fieldset id='9O90L'></fieldset></dl></div>
            • <bdo id='9O90L'></bdo><ul id='9O90L'></ul>
                  <tbody id='9O90L'></tbody>
                本文介绍了如何在 Oracle SQL Developer 中找到哪些表引用了给定的表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                在 Oracle SQL Developer 中,如果我正在查看表上的信息,我可以查看约束,这让我可以看到外键(以及该表引用了哪些表),我可以查看依赖关系以查看哪些包和引用了表.但我不确定如何找到哪些表引用了该表.

                In Oracle SQL Developer, if I'm viewing the information on a table, I can view the constraints, which let me see the foreign keys (and thus which tables are referenced by this table), and I can view the dependencies to see what packages and such reference the table. But I'm not sure how to find which tables reference the table.

                例如,假设我正在查看 emp 表.还有一个表emp_dept,它捕获了哪些员工在哪个部门工作,通过emp_id引用emp表,emp_id的主键>emp 表.有没有办法(通过程序中的某些 UI 元素,而不是通过 SQL)找到 emp_dept 表引用 emp 表,而我不必知道 emp_dept 表是否存在?

                For example, say I'm looking at the emp table. There is another table emp_dept which captures which employees work in which departments, which references the emp table through emp_id, the primary key of the emp table. Is there a way (through some UI element in the program, not through SQL) to find that the emp_dept table references the emp table, without me having to know that the emp_dept table exists?

                推荐答案

                没有.Oracle SQL Developer 没有提供这样的选项.

                No. There is no such option available from Oracle SQL Developer.

                您必须手动执行查询或使用其他工具(例如 PLSQL Developer这样的选择).以下 SQL 是 PLSQL Developer 使用的 SQL:

                You have to execute a query by hand or use other tool (For instance PLSQL Developer has such option). The following SQL is that one used by PLSQL Developer:

                select table_name, constraint_name, status, owner
                from all_constraints
                where r_owner = :r_owner
                and constraint_type = 'R'
                and r_constraint_name in
                 (
                   select constraint_name from all_constraints
                   where constraint_type in ('P', 'U')
                   and table_name = :r_table_name
                   and owner = :r_owner
                 )
                order by table_name, constraint_name
                

                其中 r_owner 是架构,r_table_name 是您要查找的表.名称区分大小写

                Where r_owner is the schema, and r_table_name is the table for which you are looking for references. The names are case sensitive

                请注意,因为在 Oracle SQL Developer 的报告选项卡上有选项所有表/依赖项",它来自 ALL_DEPENDENCIES 指的是当前用户可访问的过程、包、函数、包主体和触发器之间的依赖关系,包括对创建的视图没有任何数据库链接.".那么,这份报告对您的问题没有任何价值.

                Be careful because on the reports tab of Oracle SQL Developer there is the option "All tables / Dependencies" this is from ALL_DEPENDENCIES which refers to "dependencies between procedures, packages, functions, package bodies, and triggers accessible to the current user, including dependencies on views created without any database links.". Then, this report have no value for your question.

                这篇关于如何在 Oracle SQL Developer 中找到哪些表引用了给定的表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:如何计算 Oracle 中的表大小 下一篇:TNS-12505:TNS:listener 当前不知道连接描述符中给出的 SID

                相关文章

              1. <legend id='Xiobw'><style id='Xiobw'><dir id='Xiobw'><q id='Xiobw'></q></dir></style></legend>
                <i id='Xiobw'><tr id='Xiobw'><dt id='Xiobw'><q id='Xiobw'><span id='Xiobw'><b id='Xiobw'><form id='Xiobw'><ins id='Xiobw'></ins><ul id='Xiobw'></ul><sub id='Xiobw'></sub></form><legend id='Xiobw'></legend><bdo id='Xiobw'><pre id='Xiobw'><center id='Xiobw'></center></pre></bdo></b><th id='Xiobw'></th></span></q></dt></tr></i><div id='Xiobw'><tfoot id='Xiobw'></tfoot><dl id='Xiobw'><fieldset id='Xiobw'></fieldset></dl></div>

                1. <tfoot id='Xiobw'></tfoot>

                  • <bdo id='Xiobw'></bdo><ul id='Xiobw'></ul>

                  <small id='Xiobw'></small><noframes id='Xiobw'>