Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

ORA-00922: missing or invalid option while creating table

2611cea0-d9b3-4eb3-b4ee-46edc8b59becJun 24 2019 — edited Jun 25 2019

Hi Experts,

We are getting error ORA-00922: missing or invalid option while trying to run fololwing create table statement.

CREATE TABLE "odb_test_header" (

"fiscalyear" NUMBER(4, 0) NOT NULL,

"companyid" NUMBER(4, 0) NOT NULL,

"documentnumber" NUMBER(15, 0) NOT NULL,

"postingdate" NUMBER(8, 0) NOT NULL,

"enteredby" VARCHAR2(100) NOT NULL,

"entereddate" NUMBER(8, 0) NOT NULL,

"entrycomment" VARCHAR2(100) NOT NULL,

"amount" NUMBER(15, 2) NOT NULL,

"currency" VARCHAR2(3) NOT NULL,

"docguid" VARCHAR2(15) NOT NULL,

"binary" LONG RAW NOT NULL,

"bool" NUMBER(1) NOT NULL,

"i16" NUMBER(5, 0) NOT NULL,

"i16u" NUMBER(5, 0) NOT NULL,

"i32" NUMBER(10, 0) NOT NULL,

"i32u" NUMBER(10, 0) NOT NULL,

"i64" NUMBER(19, 0) NOT NULL,

"i64u" NUMBER(19, 0) NOT NULL,

"sng" NUMBER(7, 6) NOT NULL,

"dbl" NUMBER(17, 6) NOT NULL,

"dec" NUMBER(28, 6) NOT NULL,

"str" VARCHAR2(255) NOT NULL,

CONSTRAINT odb_test_header_PK PRIMARY KEY ("fiscalyear", "companyid", "documentnumber")

);

CREATE UNIQUE INDEX odb_test_header_UIX1 ON "odb_test_header" ("docguid");

CREATE INDEX odb_test_header_IX2 ON "odb_test_header" ("enteredby", "entereddate");

Can any one suggest what could be the issue?

We are using .Net 4.7 / DbProvider = "Oracle.ManagedDataAccess.Client" or DbProvider = "System.Data.OracleClient"

PS : this statement can be executed on SqlDevelopper.

Comments

Post Details

Added on Jun 24 2019
9 comments
5,528 views