On Wed, 2 Feb 2005 09:22:09 -0800 (PST), you wrote: > >You really should not rely on implicit assumptions in your code, >such as 'the first value of an autoincrement field is 1'. If you >use a different database, or different version of this one, that >may be wrong and a nightmare to fix.
True, but if you use the integer primary key (IPK) as a foreign key in another table, you don't want a zero value as the IPK. This is because when you get the value of the foreign key in the second table, if the foreign key has NULL in it, sqlite will return 0 from the function sqlite3_column_int to represent NULL. The only safe way is to either not allow zero as a key entry, or get the fkey as a text value. Randall Fox