"Roger Hawkins" <[EMAIL PROTECTED]> writes:

> Thanks for your reply...
> I havent found any reference to this in the doco so Im not sure how any
> of this might work..
>
> So what you are saying is that if I recreate the table I can insert all
> the old values back into the newly created table (including the primary
> key values) and the primary key column wont complain? That's a bit
> scary!
>
> Even if this is true what happens when I next insert a value (normally
> without specifying the primary key field) - does it just pick up the
> latest?

Try the ".dump" command from the sqlite shell.  It generates sql commands that
you could save and recreate the database.  Each of your primary keys which
were generated automagically will be shown, and if you take that output and
pipe it to a new sqlite shell, it will recreate an identical copy of your
database.

I believe that the next automagically generated (auto-increment) primary key
used if you provide NULL in a new INSERT, will be one greater than the maximum
value currently in the column.  That'd be an easy experiment to try.

Derrell

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to