Michael Hunley wrote:
This may be a totally rooky question, but better safe than sorry....
If I declare a table with an INTEGER PRIMARY KEY field s.t. it is an
auto-increment, do the first INSERT into it and call
sqlite_last_insert_rowid(), will I get back a 0 or something else? Will
I ever get 0 back (in case it wraps or something)?
CREATE TABLE t1(a INTEGER PRIMARY KEY);
INSERT INTO t1 VALUES(-1);
INSERT INTO t1 VALUES(NULL);
SELECT last_insert_rowid();
--
D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]