Summary
PRAGMA table_info reports pk = 0 for every column when the table has no declared PRIMARY KEY. SQLite still has rowid (unless WITHOUT ROWID). Table Browser then disables editing with “no primary key detected”.
Scope
- If
primaryKeys is empty and the table is not WITHOUT ROWID, use rowid as the PK for DML.
- Status line should not say “no primary key” in that case.
- Tests on
CREATE TABLE t (name TEXT) round-trip an UPDATE via rowid.
Out of scope
WITHOUT ROWID tables that truly have no PK.
Summary
PRAGMA table_inforeportspk = 0for every column when the table has no declared PRIMARY KEY. SQLite still hasrowid(unlessWITHOUT ROWID). Table Browser then disables editing with “no primary key detected”.Scope
primaryKeysis empty and the table is notWITHOUT ROWID, userowidas the PK for DML.CREATE TABLE t (name TEXT)round-trip an UPDATE viarowid.Out of scope
WITHOUT ROWIDtables that truly have no PK.