On Tue, Mar 8, 2011 at 8:25 AM, Jay A. Kreibich <j...@kreibi.ch> wrote: > On Tue, Mar 08, 2011 at 12:01:03AM -0800, Roger Binns scratched on the wall: >> On 03/07/2011 09:53 PM, RAKESH HEMRAJANI wrote: >> > Probleme statement is : >> > I want to implement nextval keyword in sqlite >> >> There are two separate issues here. One is wanting to know the next rowid >> that will be assigned which you can find using regular SQL queries against >> the sqlite_sequence table. This will give you the information you need and >> doesn't require SQLite to be modified in any way, > > To be more specific, the sqlite_sequence table can be used to find > the lowest sequence number that *may* be assigned. SQLite guarantees > sequence numbers are assigned in increasing order, but it does not > guarantee they will be assigned in a strict sequential order. In > short, sequence numbers can have gaps and holes.
Gaps are OK for nextval, IIUC anyways, but normally they arise out of write concurrency, which SQLite3 doesn't have. In any case, I would recommend staying away from sqlite3_sequence and instead of doing something more complete while still not necessarily going the distance regarding syntax. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users