On 10/26/08, Karl Lautman <[EMAIL PROTECTED]> wrote: > Let's say I've just added a record to a table where one of the columns is > designated an integer primary key, and I have sqlite autoincrement that > column for me with each insert. Now I need to add some records to other > tables linked to the first record. So I want to use the first record's PK > value as the foreign key for all these other records. How can I get the > first record's PK? I'm a newbie, so I can think of all sorts of ways that > seem awkward to me, but I assume there's a simple, built-in method. I just > can't find it. Thanks.
last_insert_rowid() http://www.sqlite.org/lang_corefunc.html > > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- Puneet Kishor http://punkish.eidesis.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