This is not true for Oracle either. A foreign key can certainly reference a unique (not primary) key in Oracle. See Oracle documentation, e.g. http://download.oracle.com/docs/cd/B28359_01/server.111/b28318/data_int.htm#sthref2329, or simply verify by trying it !
-- PeterN On May 16, 6:04 pm, Joshua Russo <joshua.rupp...@gmail.com> wrote: > Ok, apologize. I just tried it myself and MySQL did accept the alter > table. It is certainly not an operation that I have been able to > perform in MS SQL Server or Oracle, though I wonder if it's something > that is changing industry wide. MySQL seems to allow a foreign key to > any unique index. > > > This is simply not true, you can have foreign keys to non primary key > > fields. As a linked the "to_field" option allows you to do just that. > > > Alex > > > -- > > "I disapprove of what you say, but I will defend to the death your right to > > say it." --Voltaire > > "The people's good is the highest law."--Cicero --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---