>> [...] does
>>
>> db last_insert_rowid
>>
>> reliably return the_key of the most recently inserted database row,
>> so that the returned value may safely (across vacuums etc) be used
>> as a foreign reference to t's the_key column?
>
> Yes.
Actually there *is* a caveat, which is that if the
Eric Smith wrote:
> The tcl interface spec says:
>
>> The "last_insert_rowid" method returns an integer which is the ROWID of
>> the most recently inserted database row.
>
> So if I have
>
> db eval {CREATE TABLE t(the_key INTEGER PRIMARY KEY, data TEXT)}
>
> and I
>
> db
The tcl interface spec says:
> The "last_insert_rowid" method returns an integer which is the ROWID of
> the most recently inserted database row.
So if I have
db eval {CREATE TABLE t(the_key INTEGER PRIMARY KEY, data TEXT)}
and I
db eval {INSERT INTO t VALUES(NULL, 'foo')}
then does
3 matches
Mail list logo