1.
select *
from user_constraints
where constraint_name like '%MEDIA%'
2.
select INDEX_NAME 索引名, b.TABLE_NAME 主键表名, a.TABLE_NAME 外键表名, CONSTRAINT_TYPE, CONSTRAINT_NAME 约束名
from all_indexes a, all_constraints b
where b.TABLE_NAME='MEDIA' AND CONSTRAINT_TYPE IN('P','R')
and R_CONSTRAINT_NAME=INDEX_NAME(+)
--CONSTRAINT_TYPE='P'为主键,='R'为外键
阅读(5160) | 评论(0) | 转发(0) |