I am trying to execute this script in Oracle 11g and getting the following error, I dont know where I am missing the paranthesis or what is the mistake kindly help me figure this out.
Script:
CREATE TABLE User_Role (
user_role_id INT NOT NULL ,
Users_user_id INT FOREIGN KEY REFERENCES Users(user_id),
User_Types_user_type VARCHAR(20) FOREIGN KEY REFERENCES User_Types(user_type),
PRIMARY KEY(user_role_id)
)
Error:
ORA-00907: missing right parenthesi
Delete
FOREIGN KEYclause. Rewrite yourCREATE TABLEstatement as follows:In this case constraint names will be generated by Oracle. If you want to give them more meaningful names you could write your
create tablestatement as follows: