Why can't you use SQLite ROWID as a Primary key? Why can't you use SQLite ROWID as a Primary key? sqlite sqlite

Why can't you use SQLite ROWID as a Primary key?


Summary from SQLite.org:

In SQLite, table rows normally have a 64-bit signed integer ROWID which is unique among all rows in the same table. (WITHOUT ROWID tables are the exception.)

If a table contains a column of type INTEGER PRIMARY KEY, then that column becomes an alias for the ROWID. You can then access the ROWID using any of four different names, the original three names (ROWID, _ROWID_, or OID) or the name given to the INTEGER PRIMARY KEY column. All these names are aliases for one another and work equally well in any context.

Just use it as the primary key.