sqlite中的外键定义 [英] Foreign key definition in sqlite
本文介绍了sqlite中的外键定义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
解决方案
从SQLite 3.6开始.19,SQLite支持外键。您需要通过以下方式启用它们:
sqlite> PRAGMA foreign_keys = ON;
为了向后兼容,它们被默认关闭。
请参阅文档了解更多详情。
Cant add foreign key constraint in sqlite ...........
解决方案
As of SQLite 3.6.19, SQLite supports foreign keys. You need to enable them via:
sqlite> PRAGMA foreign_keys = ON;
They are turned off by default for backwards compatibility.
See the documentation for more details.
这篇关于sqlite中的外键定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文