Cannot resolve table name close to

前端 未结 3 1850
别那么骄傲
别那么骄傲 2020-12-17 10:24

I want to create a references to foreign table. but i\'m getting the following error:

query:

CREATE TABLE category_ids (id INT, post_id INT,
                 


        
3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-17 11:13

    Only InnoDB supports Foreign keys, MyISAM doesn't. Even if it would, you cannot create relations between tables of different type.

    Therefore you need to convert the table post into InnoDB. ALTER TABLE post ENGINE = InnoDB;

提交回复
热议问题