Tabellkolumnen måste vara av samma datatyp som cluster-kolumnen. I ditt exempel fungerar detta bra:
create table test1 ( id int ) cluster abc_clus(id); Table TEST1 created. Till och med en sammansatt nyckel fungerar, om datatypen matchar:
create table test2 ( a int, b int, primary key(a, b) ) cluster abc_clus(a); Table TEST2 created. Om datatypen är olika får du dock ditt felmeddelande:
create table test3 ( vc varchar2(7) ) cluster abc_clus(vc); ORA-01753: column definition incompatible with clustered column definition Och datatypen måste vara exakt densamma, inte ens int och number är kompatibla:
create table test4 ( n NUMBER ) cluster abc_clus(n); ORA-01753: column definition incompatible with clustered column definition REDIGERING:
Du kan till och med ha sammansatta clusters:
create cluster idc_clus ( i int, d date );
create index idc_clus_idx on cluster idc_clus;
create table test5 ( i int, d date, primary key (i,d) ) cluster idc_clus(i, d);