Oracle刪除唯一索引失敗提示ORA-01418:指定的索引不存在 ORACLE

前言

oracle數據庫執行drop index index_name 時報指定的索引不存在。

select * from user_ind_columns where index_name='unq_fileKey';
能查到唯一索引
執行 drop index unq_fileKey;卻提示如題錯誤

原因分析

是因爲oracle數據庫中索引名稱是區分大小寫的,最好用雙引號把索引名稱括起來,如下:drop index “index_name”;如果不清楚你的索引名稱的大小寫,可以到select * from user_indexes;表中查看。

解決

drop index "unq_fileKey";
即在索引名上加雙引號

 



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章