2011/10/27 Tim Streater <t...@clothears.org.uk>: > Is there a way to get a unique id from a database without actually creating a > new row? If I have: > Cheers -- Tim
sqlite> CREATE TABLE test (id integer primary key autoincrement, name text); sqlite> INSERT INTO test (name) VALUES ('xx'); sqlite> BEGIN; sqlite> UPDATE sqlite_sequence SET seq=seq+3 WHERE name='test'; sqlite> SELECT seq FROM sqlite_sequence WHERE name='test'; 4 sqlite> END; sqlite> INSERT INTO pokus (name) VALUES ('xxxxxxx'); sqlite> SELECT * FROM test; 1|xx 5|xxxxxxx -- Kit _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users