Search code examples
sqloracle-databaseora-00907

Why does Oracle think I'm missing a right parenthesis?


In Oracle 10i, I'm running the following command:

ALTER TABLE jnrvwchnglst ADD
     ( jnrvwchnglst_userid NUMBER(10) NOT NULL DEFAULT 1 )

Yes jnrvwchnglst is an existing table and no jnrvwchnglst_userid is not an existing column.

The Oracle error message is:

ORA-00907: missing right parenthesis

What's wrong with this query and why does Oracle think I'm missing a parenthesis?


Solution

  • ALTER TABLE jnrvwchnglst ADD
         ( jnrvwchnglst_userid NUMBER(10) DEFAULT 1  NOT NULL )