0 in my first sqlite3 DB
________________________________ From: sqlite-users <sqlite-users-boun...@mailinglists.sqlite.org> on behalf of Jean-Christophe Deschamps <j...@antichoc.net> Sent: Saturday, March 17, 2018 9:04:22 AM To: SQLite mailing list Subject: Re: [sqlite] How many AUTOINCREMENT tables are in your schema? >How many tables in your schema(s) use AUTOINCREMENT? Maybe a dozen uses in DB designs I made for my own use. Zero or very few in designs made for others. My use case of autoincrement is certainly somehow peculiar. For some of DBs I use daily for managing my own business (I'm self-employed) I didn't feel the need to write ad-hoc applications and I only use a third-party SQLite manager (SQlite Expert is open 24/7). Of course such use demands real care and a lot of fancy constraints, triggers, add-on functions, external procedures, etc to be workable. This isn't scalable nor usable by anyone else. Several of my tables are best viewed/edited as LIFOs: the more recent entries on top. For instance a table of orders, where you prefer recent entries to be on top of the table when viewed by "natural" (ID) order. To achieve that effect I use autoincrement and triggers which negate the rowid alias at insert. The sqlite-sequence entry is handy to make new row get an unused ID which, once negated, will show first when viewing the table, albeit there is no more any non-negative ID in the actual table. I wouldn't have the use of autoincrement if my DB manager had a settable ORDER BY clause for basic table viewing/editing. _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users