Skip to content
Advertisement

Why is this CREATE command not running?

This is a part of a script which the whole script runs without errors. I followed the script and made minor changes, just by changing names, etc and discarded few commands like ‘create or replace force view’, sequences.

This is one of the ‘CREATE TABLE’ commands that I edited from there.

Errors came out; ORA-00907: missing right parenthesis

ORA-06512: at “SYS.WWV_DBMS_SQL_APEX_210200”, line 673

ORA-06512: at “SYS.DBMS_SYS_SQL”, line 1658

ORA-06512: at “SYS.WWV_DBMS_SQL_APEX_210200”, line 659

ORA-06512: at “APEX_210200.WWV_FLOW_DYNAMIC_EXEC”, line 1829

“Prod_Avail” VARCHAR2(20) CONSTRAINT “Prod_Price_NN” NOT NULL ENABLE, “Prod_MDate” DATE CONSTRAINT “Prod_MDate_NN” NOT NULL ENABLE, “Prod_EDate” DATE CONSTRAINT “Prod_EDate_NN” NOT NULL ENABLE,

“Cust_ID” NUMBER(4,0),

“Sto_ID” VARCHAR(8) CONSTRAINT “Sto_ID_NN” NOT NULL ENABLE,

Advertisement

Answer

I’d suggest you to forget about double quotes while working with Oracle. Nothing good in them, only problems.

When you fix errors

  • enclosing column names with mixed case into double quotes in constraints
  • use unique constraint names
  • rearrange using index enable

then it works:

But – once again – I wouldn’t do it that way. How would I do it? Lke this:

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement