Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I run my code on sql oracle and it continues to show me missing right parenthesis. I tried everything even adding a comma and im not sure where the error is at.

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

Customer_ID int FOREIGN KEY REFERENCES Customer(Customer_ID),
Owner_ID int FOREIGN KEY REFERENCES Owners(Owner_ID),
Payment_ID int FOREIGN KEY REFERENCES Payment (Payment_ID));


What I have tried:

I have tried comma and putting right parenthesis but none is working.
Posted
Updated 5-Dec-21 19:58pm
Comments
Mohibur Rashid 5-Dec-21 23:23pm    
make sure this is a pure ANSI source, unicode or hidden character

1 solution

YOu forgot the CONSTRAINT keyword: Oracle / PLSQL: Foreign Keys[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900