SQLite Forum

Primary Key v Unique Index
My understanding from https://sqlite.org/lang_createtable.html Section 3.5 paragraph 2

> If a table has a single column primary key and the declared type of that column is "INTEGER" and the table is not a WITHOUT ROWID table, then the column is known as an INTEGER PRIMARY KEY. See below for a  description of the special properties and behaviors associated with an INTEGER PRIMARY KEY.

It isn't just the literal phrase "INTEGER PRIMARY KEY" that is magic, but as long as the type of the column is INTEGER (and only that spelling, not just anything with integer affinity) and is made to be THE primary key, even by a primary key constraint clause later in the table definition (but at the initial time of creation), that the column becomes that special alias to the ROWID.