Skip to content
Advertisement

can’t set a foreign key on oracle sql

Here is my code:

and it gave me this error:

What is wrong with parenthesis in my code? this only happens when i set foreign key.

Note: i am using SQL cmd from Oracle Database 11g Express Edition.

I’ve tried making theses tables on MySQL and it worked fine.

Advertisement

Answer

No “FOREIGN KEY” keyword is used for inline constraints. So, like this:

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