"Paul Hilton" <[EMAIL PROTECTED]> wrote: > > Here is the problem: I want Slot created to disambiguate the Primary Key, So > that for every value of Group the value of Slot starts at 1 and counts up.
These are two different things: (1) Slot needs to disambiguate the PRIMARY KEY (2) Slot needs to start at 1 and count upwards Do you really need (2)? If not - if (1) is all you really need - then one approach is to fill the slot with a random number. Depending on how many slots you have and how often you fill them, you might be able to get away with always using a random 64-bit integer and never checking for collisions because collisions will be much so rare that random computer explosions are much more likely. Whether or not this is true depends on your application, the reliability of your hardware, and the consequences of a collision. Do the math. If in doubt, you might use a 128-bit or longer random blob instead of an integer. -- D. Richard Hipp <[EMAIL PROTECTED]> _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users