Hi,

I got a table in my database which looks like the following:

A       | B     | C
1       | 119   | 0
1       | 120   | 1
1       | 121   | 0
2       | 120   | 2
2       | 121   | 2

I want the A value to be generated for the bold rows (ie first inserts of each 
'linked' item) and I'd like to re-use the id provided in the other rows.

INSERT INTO table VALUES ('',119,0)
SELECT TO GET THE AUTO GENERATED VALUE
INSERT INTO table VALUES (1,120,1)
INSERT INTO table VALUES (1,121,0)

Is this possible or should I go with another way of structuring my database?

It isn't possible for me to look up the highest value in this database as it 
will be archived alot (emptied) and I'd like to not have to do check ups in the 
archive db.

Regards,
Tobias

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to