ORA-02270: no matching unique or primary key for this column-list
Cause: A REFERENCES clause in a CREATE/ALTER TABLE statement gives a column-list for which there is no matching unique or primary key constraint in the referenced table.
Action: Find the correct column names using the ALL_CONS_COLUMNS catalog view
The error message is quite clear:
Table PARTY has foreign key
Oh i see, well the char (5) is based on the fact the the C-ID will always be made up of 5 characters, but i understand why VARCHAR maybe more appropriate, Thank you.
I dont quite understand how special characters, such as #, may cause trouble though, as my lecturer seems to use them all the time, LoL and in alot of the example tables she has given us, number is almost always shortened to #.
But i will change it to number, thank you very much
Oh i see, well the char (5) is based on the fact the the C-ID will always be made up of 5 characters
If it's always 5 characters, then CHAR(5) is the right choice (those other 10% )
I dont quite understand how special characters, such as #, may cause trouble though
Well at least the dash (-) will require you to quote all column names (which also makes them case-sensitive: "C-ID" is something different than "c-id"), and there are tools out there which do have a hard time supporting this.
It seems that Oracle indeed happily accepts the # without problems which I wasn't aware of. So you proved me wrong there