Home > Database > Mysql Tutorial > oracle中查询所有外键引用到某张表的记录

oracle中查询所有外键引用到某张表的记录

WBOY
Release: 2016-06-07 15:02:46
Original
1289 people have browsed it

欢迎进入Oracle社区论坛,与200万技术人员互动交流 >>进入 oracle中查询所有外键引用到某张表的记录 //查询表的主键约束名 select * from user_constraints e where e.table_name='表名';--输入 //查询所有引用到该主键的记录 select b.table_name,b.column_

欢迎进入Oracle社区论坛,与200万技术人员互动交流 >>进入

  oracle中查询所有外键引用到某张表的记录

  //查询表的主键约束名

  select * from user_constraints e where e.table_name='表名';--输入

  //查询所有引用到该主键的记录

  select b.table_name,b.column_name from user_constraints a

  inner join user_cons_columns b

  on a.constraint_name = b.constraint_name

  where a.r_constraint_name='主键名'--输入

oracle中查询所有外键引用到某张表的记录

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template