cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot create foreign key

Former Member
0 Kudos

I use this statement to create a new foreign key:

Alter Table "RETAILER" add Foreign Key ("USERGROUP_ID") references "USERGROUP" ("USERGROUP_ID") on delete restrict

The error message I get is as follows:

[Error Code: -4005, SQL State: 42000] [-4005] (at 42): Unknown column name:ZIP

"ZIP" is an existing colum of the "RETAILER" entity. But what the heck has the ZIP column to do with the alter table statement?!

Cheers,

Dominik

Accepted Solutions (0)

Answers (1)

Answers (1)

lbreddemann
Active Contributor
0 Kudos

Hi Dominik,

what MaxDB version do you use?

Please post the DDL for the two tables so that we can reproduce the problem.

Best regards,

Lars