ON DELETE CASCADE in sqlite3

后端 未结 2 1821
醉酒成梦
醉酒成梦 2020-12-02 22:11

I have the following structure: (Sorry for awkward names, it is because it is a sqlite database for my iPhone app which is not released yet)

CREATE TABLE klb         


        
相关标签:
2条回答
  • 2020-12-02 22:44

    Foreign key support is not enabled in SQLite by default. You need to enable it manually each time you connect to the database using the pragma:

    PRAGMA foreign_keys = ON
    
    0 讨论(0)
  • 2020-12-02 22:46

    Do you have foreign key support enabled?

    query PRAGMA foreign_keys = ON; to turn it on

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