no foreign key in table if engine is MyISAM

后端 未结 1 1215
太阳男子
太阳男子 2021-01-26 03:27

why i cannot create foreign key in my table payments.

crate table students(
text char(5)NOT NULL,
id int(11)NOT NULL AUTO_INCREMENT,
name varchar(250),
level var         


        
相关标签:
1条回答
  • 2021-01-26 03:52

    Because MyISAM does not support foreign keys. The FK declarations are parsed, but otherwise ignored. You need to use InnoDB tables for real FK support.

    0 讨论(0)
提交回复
热议问题