How to use TRIGGER in Android SQLite

前端 未结 3 1297
夕颜
夕颜 2020-12-10 06:04

I have two tables in database:

  • table one has name and room number column
  • table two has room number and time column.

Now when the r

3条回答
  •  余生分开走
    2020-12-10 06:19

    Depending on which version of SQLite your app is running on, you might be able to use SQLite's foreign key support.

    In older version's of SQLite you might be able to use the genfkey utility to create triggers to enforce your foreign key constraints (older versions of SQLite would parse foreign key constraints added during a CREATE TABLE statement, but wouldn't actually implement them).

    Hope this helps.

提交回复
热议问题