2016-08-13 31 views
1

您可以幫助我創建具有三列的IOT,其中一個必須具有desc命令。如何使用desc命令創建按索引組織的表格

我創建了表格,但它沒有按照created_date desc的順序排列。

我的表:

create table audit_log (
    id integer, 
    created_date timestamp, 
    module_type_id integer, 
    ...<other columns>... 
    constraint pk_audit_log primary key (created_date, module_type_id, id)) 
organization index overflow; 

我需要像IOT constraint pk_audit_log primary key (created_date DESC, module_type_id, id)

不幸的是,我不能在網上找到如何做到這一點的任何資源。 有沒有人面臨任何類似的任務,或知道如何創建一個腳本?

謝謝

回答

1

我不認爲這是可能的。使用Oracle內部函數SYS_OP_DESCEND時,降序索引實際上是基於函數的索引。索引組織表的主索引不能基於函數。

相關問題