Hi again,
Brown, Dave wrote:
Is it possible to create the behaviour of a sequence with SQLite?
I need to do something like this:
[pseudocode] var id = SELECT next_val FROM my_sequence; INSERT INTO table1 VALUES(id, ...); INSERT INTO table2 VALUES(id, ...);
I forgot to say that if you want to insert the same ID into different tables, you'll have to create a single table that is an "id generator" using the method provided in the FAQ.
For an example of how this could be done, see my Open Source text database project:
http://emdros.org/preview/
You'll want to look in EMdF/sqliteemdfdb.cpp and EMdF/sqliteconn.cpp as well as their counterparts in include/
Cheers,
Ulrik