Johnny Raved
Johnny Raved

Reputation: 13

Are foreign keys supported in the Android SDK implementation of SQLite?

Oddly, I cannot find an answer to this question. I'm doing table designs with the assumption that I'll be able to use foreign keys in my Android app. If I can't using the default sdk, are there other options? Can I gen a build with the pragma and include it as a lib?

Upvotes: 0

Views: 61

Answers (1)

CommonsWare
CommonsWare

Reputation: 1006539

Quoting the SQLite documentation:

...support for SQL foreign key constraints [was] introduced in SQLite version 3.6.19

According to the SO question serving as our repository of version info, API Level 8+ should have a new-enough SQLite version to offer foreign key support. That should be enough for most developers.

Upvotes: 2

Related Questions