Skip to content
Advertisement

ORA-01748: only simple column names allowed here in Oracle

What I am trying to do ?

I am trying to create two tables and at the same time i am trying to link them together using foreign and primary keys. However I successfully create my parent table ( Student with primary key ) but failed to create child table ( Attendence with foreign key ).

What is the problem ?

I get the following error while creating Attendence table:

ERROR at line 5: ORA-01748: only simple column names allowed here

My code:

Student table:

Attendence table:

Advertisement

Answer

Your foreign key constraint syntax is wrong; it should be:

You are preceding the FK column name with the table name, which is wrong in itself, but also have it in the wrong place.

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