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
