1>根据所有主外键关联的表
select (select a.table_name
from user_constraints a
where a.constraint_name = c.r_constraint_name) 主表表名,
c.r_constraint_name 主表主键键约束名,
c.table_name 从表表名,
c.constraint_name 从表外键约束名,c.*
from user_constraints c
where c.constraint_type = 'R';
2>查询表的约束
select * from user_cons_columns
3>查询表的字段信息
select * from user_tab_columns
