select table_name from user_constraints where r_constraint_name in (select constraint_name from user_constraints where upper(table_name) = 'TB_PK' and constraint_type ='P') and constraint_type ='R';
以上表示查找所有references表TB_PK的外键表。其中P表示主键,R表示外键。
select table_name from user_constraints where r_constraint_name in (select constraint_name from user_constraints where upper(table_name) = 'TB_PK' and constraint_type ='P') and constraint_type ='R';
以上表示查找所有references表TB_PK的外键表。其中P表示主键,R表示外键。
上一篇:计算机程序设计语言种类
案例1:表管理 案例2:数据类型 案例3:数据批量处理 案例4:表头基本约束
-- 查询外键约束(查某表的所有父表) select c.constraint_name,cc.column_name,rcc.owner,rcc.table_name,rcc.column_namefrom user_constraints c,user_cons_columns cc,user_c
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M