Page 1 of 1

internal rowid field

Posted: Wed 17 Feb 2016 13:44
by m227
Dear Sirs,
I found that when opening SQLite tables with external programs usually I see field named rowid. Do I need to create my own Primary Key field in a table or is there already an existing rowid field (with TLiteTable)?

I could not find any.
MichaƂ

Re: internal rowid field

Posted: Thu 18 Feb 2016 12:32
by MaximG
Description of working with the special ROWID field in SQLite is available at https://www.sqlite.org/lang_createtable.html#rowid.

The special ROWID field is used by SQLite for its own purposes and doesn't substitute the primary key. In order for a table to have a primary key, you should create it explicitly: https://www.sqlite.org/lang_createtable ... imkeyconst