Can't add foreign key...

[expired user #4655]'s profile image [expired user #4655] posted 14 years ago in General Permalink
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?
[expired user #4655]'s profile image [expired user #4655] posted 14 years ago Permalink
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.