On Mon, Feb 9, 2009 at 9:44 AM, Vance E. Neff <ven...@intouchmi.com> wrote:
> Can I do the
>
> select last_insert_rowid();
>
> to determine the new index value
> After the COMMIT command?

Yes, but I am not sure what you mean by the "new index value"... keep
in mind, the last_insert_rowid() returns, well, the last inserted
rowid.



>
> Vance
>
>
>
>
> Igor Tandetnik wrote:
>
>>Vance E. Neff <ven...@intouchmi.com> wrote:
>>
>>
>>>Just to be straight, I would use the Query:
>>>SELECT last_insert_rowid() AS TheNewKeyValue FROM TableX
>>>
>>>
>>
>>No, you would just do
>>
>>select last_insert_rowid();
>>
>>Or you could call sqlite3_last_insert_rowid() API directly.
>>
>>Last inserted ROWID is the property of a connection, not of a table.
>>
>>Igor Tandetnik
>>
>>



-- 
Puneet Kishor http://www.punkish.org/
Nelson Institute for Environmental Studies http://www.nelson.wisc.edu/
Open Source Geospatial Foundation (OSGeo) http://www.osgeo.org/
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to