distal-attribute
distal-attribute
distal-attribute
distal-attribute

Can't add foreign key...

User, date Message
Written by robertnzana
5 years ago
Category: General
5 posts since Tue, 26 Jan 10
I have a new table that has 3 fields. First field is the pk. 2nd and 3rd are foreign keys to the same users table (same userid field). When I add the foreign key it says...

SQL Error (1005): Can't create table.... (errno: 121)
Duplicate key on write or update

Any ideas why?
Written by robertnzana
5 years ago
5 posts since Tue, 26 Jan 10
Key names have to be unique. That was the problem!

I'm used to the other tool I used which, by default, created a unique name.

Thanks!
 

Please login to leave a reply, or register at first.