Home » Android » android – sqlite without primary key?

android – sqlite without primary key?

Posted by: admin June 15, 2020 Leave a comment

Questions:

Is there a way in Android to have an sqlite database which does have one or two tables which do NOT have a primary key?

The reason being that the column with the primary key is to be implemented later in the process, I do not know what that is supposed to be yet but I want to get the database working.

How to&Answers:

You don’t need to define a primary key. By default, the table will have a key based on the rowid value.

More information can be found in the documentation here.