December 2013
Beginner
416 pages
12h 45m
English
When you created the two tables in the preceding section, you added an integer field called _id that was marked as a primary key. Primary keys uniquely identify a row in a table; no two rows will have the same value. The autoincrement functionality that you used is a convenient way of making sure that the IDs are unique. Note that the IDs themselves are unique only in the table, and not across the entire database. Thus, rows in separate tables may have the same ID.
Although the ID will generally increment by 1, they may not always do so, so don’t assume this is necessarily the case in your code.
If you do not create your own primary key, SQLite will create one for you having the name _id.
Keys don’t have ...
Read now
Unlock full access