Mysql foreign key by non unique key — how is that possible?

后端 未结 4 1991
南笙
南笙 2021-01-12 08:50

I was migrating mysql database to postgres and stumbled across the following block in DDL (Note: This is what I got from mysqldump):

CREATE TABLE `catalog_pr         


        
4条回答
  •  别那么骄傲
    2021-01-12 09:31

    This is perfectly legal according to wikipedia:

    The columns in the referencing table must be the primary key or other candidate key in the referenced table.

提交回复
热议问题