CREATE TABLE Peaje (
  id_no_pk        CHAR(2)     NOT NULL,
  nombre          VARCHAR(30) NOT NULL,
  localizacion    VARCHAR(30) NOT NULL,
  dirrecion       VARCHAR(50) NOT NULL,
  tipo            CHAR(1)     NOT NULL,
  municipio_fk    CHAR(2),
  CONSTRAINT Peaje_id_no_pk PRIMARY KEY(id_no_pk)
  CONSTRAINT Peaje_municipio_fk FOREIGN KEY (municipio_fk) REFERENCES Municipio(id_no_pk));

CONSTRAINT Peaje_municipio_fk FOREIGN KEY (municipio_fk) REFERENCES Municipio(id_no_pk))
*
ERROR at line 9:
ORA-00907: missing right parenthesis

The parenthesis are in pairs and match. Why would this error message occur and how could I fix it>?

Edit: this is the other Table for reference:

        CREATE TABLE Municipio (
        id_no_pk CHAR(2) PRIMARY KEY,
        nombre  VARCHAR(20) NOT NULL ) ;

Try taking out the comma at the end of

municipio_fk    CHAR(2),
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.