小男孩‘自慰网亚洲一区二区,亚洲一级在线播放毛片,亚洲中文字幕av每天更新,黄aⅴ永久免费无码,91成人午夜在线精品,色网站免费在线观看,亚洲欧洲wwwww在线观看

分享

oracle唯一性約束和索引的關(guān)心

 Levy_X 2017-07-26
Theterm key refers only to the columns defined in the integrity constraint. Because the database enforces a unique constraint byimplicitly creating or reusing an index on the key columns, the term uniquekey is sometimes incorrectly used as a synonym for unique key constraint orunique index. --數(shù)據(jù)庫在創(chuàng)建unique constraint的同時,強制創(chuàng)建或者重用列上的索引。如果之前列上沒有索引,那么強制創(chuàng)建的索引是unique index,如果列上已經(jīng)存在索引,就重用之前的索引。
Oracle 自動創(chuàng)建了索引并關(guān)聯(lián)到約束, 索引名和約束名是相同的。
不能刪除unique/primary key 上的索引。在這種情況下,我們只有先刪除約束。
再次drop 索引時,提示索引已經(jīng)不存在,說明已經(jīng)在刪除約束的同時,把索引刪掉了。
當約束列上沒有索引時,在創(chuàng)建unique constraint 時,oracle 會自動創(chuàng)建unique index,并且該索引不能刪除,當刪除unique constraint 時,unique index 會自動刪除。

    本站是提供個人知識管理的網(wǎng)絡存儲空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點。請注意甄別內(nèi)容中的聯(lián)系方式、誘導購買等信息,謹防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點擊一鍵舉報。
    轉(zhuǎn)藏 分享 獻花(0

    0條評論

    發(fā)表

    請遵守用戶 評論公約

    類似文章 更多