newnewbie
newnewbie

Reputation: 1003

sqlite without primary key?

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.

Upvotes: 15

Views: 13400

Answers (1)

Eugene S
Eugene S

Reputation: 3122

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.

Upvotes: 25

Related Questions