文档解释
ORA-25186: INCLUDING clause specified for index-organized table without OVERFLOW
Cause: INCLUDING clause of a CREATE TABLE is an valid option only for index-organized tables with OVERFLOW clause (at creation time) or if an OVERFLOW segment already exists (at ALTER time).
Action: Specify OVERFLOW clause for the index-organized table : For ALTER, perform ADD OVERFLOW first.
ORA-25186 错误通知用户,INDEX-ORGANIZED表禁止使用 INCLUDING 子句。
官方解释
RA-25186:(加入子句指定给索引组织表案)
当指定 INCLUDING子句 对 INDEX-ORGANIZED表的时候,会发生ORA-25186错误。INCLUDING 子句是用于索引组织表的 OVERFLOW 子句的一部分。
常见案例
例如,下面的查询将会引发ORA-25186错误:
CREATE TABLE t1
(id NUMBER(6) PRIMARY KEY,
last_name VARCHAR2(20),
first_name VARCHAR2(15))
ORGANIZATION INDEX
INCLUDING (last_name, first_name);
一般处理方法及步骤
为解决这个问题,需要从SQL语句中删除INCLUDING的子句,因为索引组织表不支持INCLUDING子句:
CREATE TABLE t1
(id NUMBER(6) PRIMARY KEY,
last_name VARCHAR2(20),
first_name VARCHAR2(15))
ORGANIZATION INDEX;