SQLite Forum

Primary Key v Unique Index
Login
The INTEGER PRIMARY KEY phrase is magic and allows you to retrieve the internal rowid of a row in a rowid table using a user-defined name.

Your second example does not use the magic incanttion, so the field is something comletely disconnected from the internal rowid (which you can still access via any of the default names).

You cannot change from non-magic to magic definition. If this were possible, you would be overwriting the id you specified when inserting the record with SQLite's idea of the rowid and probably lose referential integrity on any foreign key that references that field.