On 27 Oct 2011, at 8:12pm, Tim Streater wrote: > Is there a way to get a unique id from a database without actually creating a > new row?
Sure. Do something like SELECT max(id) FROM mytab; Then in your own code, add 1 to it and use that as the "id" for the row you're about to save. Make sure you handle the NULL case (where mytab doesn't have any rows in it yet) correctly. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users