LOB字段建立索引

 lob字段本身不能建立索引

 

SQL> create table ml_test1(a clob);
 
Table created
 
SQL> create index idx_ml_test1 on ml_test1 (a);
 
create index idx_ml_test1 on ml_test1 (a)
 
ORA-02327: 无法以数据类型 LOB 的表达式创建索引
 
 SQL> ALTER TABLE ml_test1 MOVE
  2    TABLESPACE users
  3    LOB (a) STORE AS lobsegment
  4    (TABLESPACE users  );
 
Table altered
 
SQL> select index_name,status,index_type,table_name from user_indexes where table_name='ML_TEST1';
 
INDEX_NAME                     STATUS   INDEX_TYPE                  TABLE_NAME
------------------------------ -------- --------------------------- ------------------------------
SYS_IL0000076123C00001$$       VALID    LOB                         ML_TEST1
 
SQL>


 

你可能感兴趣的:(LOB字段建立索引)