📜  sql 查看索引 - SQL 代码示例

📅  最后修改于: 2022-03-11 15:04:57.903000             🧑  作者: Mango

代码示例1
-- Oracle  (all_indexes: depending on grants, dba_indexes: for all indexes))
SELECT index_name FROM user_indexes WHERE table_name = 'MY_TABLE';
-- List of indexed columns:
SELECT index_name, column_position, column_name
FROM user_ind_columns         -- or all_ind_columns / dba_ind_columns
WHERE table_name = 'MY_TABLE'  
ORDER BY index_name, column_order;