查看索引
SELECT T.*, I.INDEX_TYPE FROM USER_IND_COLUMNS T, USER_INDEXES I WHERE T.INDEX_NAME = I.INDEX_NAME AND T.TABLE_NAME = I.TABLE_NAME ----指定表 AND T.TABLE_NAME = '表名'
查找表的外键
SELECT c.OWNER AS "数据库", c.CONSTRAINT_NAME AS "约束名称", c.CONSTRAINT_TYPE AS "约束类型", c.TABLE_NAME AS "表名", cl.COLUMN_NAME AS "字段名" FROM user_constraints c, user_cons_columns cl WHERE c.CONSTRAINT_NAME = cl.CONSTRAINT_NAME AND c.constraint_type = 'R' AND c.table_name='表名'
标签:INDEX,NAME,CONSTRAINT,cl,索引,表名,oracle,TABLE From: https://www.cnblogs.com/ketoli/p/17176176.html