Skip to content
Advertisement

Right error missing parenthesis error, Where is the placement at?

Why does the query produce an right parenthesis: Error report – ORA-00907: missing right parenthesis 00907. 00000 – “missing right parenthesis” I have tried everything on where to put the right parenthesis and it is not working.

Here is my code:

CREATE TABLE Trips 
(
    Trips_ID NUMBER NOT NULL,  
    Date_of_Trip DATE NOT NULL, 
    Payment NUMBER NOT NULL,
    Destination_Town VARCHAR2(50) NOT NULL, 
    Source_Town VARCHAR2 (50) NOT NULL,
    Customer_ID NUMBER NOT NULL

    CONSTRAINT Trip_pk
        PRIMARY KEY (Trips_ID),
    CONSTRAINT Customer_fk
        FOREIGN KEY (Customer_ID) REFERENCES Customer (Customer_ID),
    CONSTRAINT Owner_fk
        FOREIGN KEY (Owner_ID) REFERENCES Vehicle_Owners (Owner_ID),
    CONSTRAINT Payment_fk
        FOREIGN KEY (Payment_ID) REFERENCES Payment (Payment_ID)
);

Advertisement

Answer

Add a comma after “Customer_ID NUMBER NOT NULL”. That should fix the issue.

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