为什么Oracle报告“ORA-00906:我的SQL查询缺少左括号?

jhkqcmku  于 2023-06-05  发布在  Oracle
关注(0)|答案(1)|浏览(212)
CREATE TABLE "ITDEV"."WWV_FLOW_FILE_OBJECTS$" 
   (    "ID" NUMBER, 
    "FLOW_ID" NUMBER NOT NULL ENABLE, 
    "NAME" VARCHAR2(400) NOT NULL ENABLE, 
    "PATHID" NUMBER, 
    "FILENAME" VARCHAR2(400), 
    "TITLE" VARCHAR2(255), 
    "MIME_TYPE" VARCHAR2(255), 
    "DOC_SIZE" NUMBER, 
    "DAD_CHARSET" VARCHAR2(128), 
    "CREATED_BY" VARCHAR2(255), 
    "CREATED_ON" DATE, 
    "UPDATED_BY" VARCHAR2(255), 
    "UPDATED_ON" DATE, 
    "DELETED_AS_OF" DATE DEFAULT to_date('01-01-0001','DD-MM-YYYY') NOT NULL ENABLE, 
    "LAST_UPDATED" DATE, 
    "CONTENT_TYPE" VARCHAR2(128), 
    "BLOB_CONTENT" BLOB, 
    "LANGUAGE" VARCHAR2(30), 
    "DESCRIPTION" VARCHAR2(4000), 
    "SECURITY_GROUP_ID" NUMBER, 
    "FILE_TYPE" VARCHAR2(255), 
    "FILE_CHARSET" VARCHAR2(128), 
     CONSTRAINT "WWV_FLOW_FILE_OBJ_PK" PRIMARY KEY ("ID")
  USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT), 
UNIQUE ("NAME")
  USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT )  ENABLE
   ) SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  LOB ("BLOB_CONTENT")STORE AS BASICFILE (
  STORAGE IN ROW CHUNK 8192 RETENTION 
  NOCACHE LOGGING 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT));

输出

SQL Error [906] [42000]: ORA-00906: missing left parenthesis
ioekq8ef

ioekq8ef1#

STORAGE IN ROW应该是ENABLE STORAGE IN ROW(参见文档)。

CREATE TABLE "ITDEV"."WWV_FLOW_FILE_OBJECTS$" 
(
    "ID" NUMBER, 
    "FLOW_ID" NUMBER NOT NULL ENABLE, 
    "NAME" VARCHAR2(400) NOT NULL ENABLE, 
    "PATHID" NUMBER, 
    "FILENAME" VARCHAR2(400), 
    "TITLE" VARCHAR2(255), 
    "MIME_TYPE" VARCHAR2(255), 
    "DOC_SIZE" NUMBER, 
    "DAD_CHARSET" VARCHAR2(128), 
    "CREATED_BY" VARCHAR2(255), 
    "CREATED_ON" DATE, 
    "UPDATED_BY" VARCHAR2(255), 
    "UPDATED_ON" DATE, 
    "DELETED_AS_OF" DATE DEFAULT to_date('01-01-0001','DD-MM-YYYY') NOT NULL ENABLE, 
    "LAST_UPDATED" DATE, 
    "CONTENT_TYPE" VARCHAR2(128), 
    "BLOB_CONTENT" BLOB, 
    "LANGUAGE" VARCHAR2(30), 
    "DESCRIPTION" VARCHAR2(4000), 
    "SECURITY_GROUP_ID" NUMBER, 
    "FILE_TYPE" VARCHAR2(255), 
    "FILE_CHARSET" VARCHAR2(128), 
     CONSTRAINT "WWV_FLOW_FILE_OBJ_PK" PRIMARY KEY ("ID")
       USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
       STORAGE(
         INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
         PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
         BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT
       ), 
     UNIQUE ("NAME")
       USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
       STORAGE(
         INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
         PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
         BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT
      )  ENABLE
)
  SEGMENT CREATION IMMEDIATE 
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
  NOCOMPRESS LOGGING
  STORAGE(
    INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
    BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT
  )
  LOB ("BLOB_CONTENT")
  STORE AS BASICFILE (
    ENABLE STORAGE IN ROW
    CHUNK 8192
    RETENTION 
    NOCACHE
    LOGGING 
    STORAGE(
      INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
      BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT
    )
  );

相关问题