oracle如何查看表索引呢?(oracle show index columns)很简单,只需要将下面“upper”部分换成你的数据库表名即可oracle查看表索引了,如下:
select
b.uniqueness, a.index_name, a.table_name, a.column_name
from all_ind_columns a, all_indexes b
where a.index_name=b.index_name
and a.table_name = upper(table_name)
order by a.table_name, a.index_name, a.column_position;
例如我要查询employee员工表里面哪些字段有数据库索引,即可如下查询:
select b.uniqueness, a.index_name, a.table_name, a.column_name from all_ind_columns a, all_indexes b where a.index_name=b.index_name and a.table_name = upper('employee') order by a.table_name, a.index_name, a.column_position;