Disappearing Foreign Keys in phpMyAdmin

后端 未结 4 667
猫巷女王i
猫巷女王i 2021-02-09 21:03

I am creating a new table inside mysql and I am trying to add a foreign key constraint to one of the fields.

CREATE TABLE `onlineorder` (
  `receiptid` varchar(10) NO         


        
4条回答
  •  日久生厌
    2021-02-09 21:35

    You need to use the InnoDB engine to have foreign keys.

    Ref: http://dev.mysql.com/doc/refman/5.0/en/innodb-foreign-key-constraints.html

提交回复
热议问题