On 05/02/2012 02:42 PM, Dennis Lee Bieber wrote: > On Wed, 02 May 2012 12:37:55 -0700, Adrian Klaver > <[email protected]> declaimed the > following in gmane.comp.python.dabo.user: > >> >> http://www.sqlite.org/autoinc.html >> > Even that link isn't clear on the quirk... But > > http://www.sqlite.org/lang_createtable.html#rowid > > has the explicit description. And based on my reading, it means that > "integer primary key" specifies an alias for the internal rowid column. > "int primary key" is still a unique key using SQLite3's affinity process > (so a non-integer value might be provided). But your link does imply > that "autoincrement" is only permissible against the rowid, so the long > specification is needed to identify that... >
INTEGER PRIMARY KEY is always an alias for ROWID. Adding the AUTOINCREMENT keyword guarantees that the sequence only increases and can not go backwards. Without the AUTOINCREMENT keyword Sqlite reserves the right to go back and fetch unused integers less than the current max(ROWID). > -- Adrian Klaver [email protected] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/[email protected]
