Search code examples
sqloracle-databaseoracle11gddlora-00907

ORA-00907: missing right parenthesis Developer


What could be the problem?

CREATE TABLE ASIGNACION_ANUAL(
ANIO NUMBER(4),
COD_VENDEDOR VARCHAR2(4),
MONTO_ASIGNACION NUMBER(9) NULL_MONTO,
CANT_VENTAS NUMBER(2) NULL_CANT_VENTAS,
CONSTRAINT ASIGNACION_ANUAL_PK PRIMARY KEY (ANIO, COD_VENDEDOR)
);

Error message:

ORA-00907: missing right parenthesis 00907. 00000 - "missing right parenthesis"


Solution

  • remove NULL_MONTO and NULL_CANT_VENTAS :

    CREATE TABLE ASIGNACION_ANUAL (
    ANIO NUMBER(4),
    COD_VENDEDOR VARCHAR2(4),
    MONTO_ASIGNACION NUMBER(9) NULL,
    CANT_VENTAS NUMBER(2) NULL,
    CONSTRAINT ASIGNACION_ANUAL_PK PRIMARY KEY (ANIO, COD_VENDEDOR)
    )