This is slightly off topic perhaps, but maybe not too much ...
I'm wondering if anyone can recommend a good general book on relational
database design. I am using PostgreSQL, so a PG-centric book would be best, but
I'm mainly interested in the art/science of good SQL database design regardless
The 3636 INSERT-Statements contains a fix value for the ID-Column,
right? Thats wrong, omit the id-column and value or use simply 'default' for
it.
That's right. I thought that might be the case.
- how can I rectify the situation?
Set the sequence to the new value, 3636+9, via
I have a table where I have a serialnumber which shuld be increased be
each INSERT. I know I can use max() to get the highest number, but how
can I use it in a INSERT statement?
Have a look in the manual for the SERIAL data type.
For fields with a SERIAL data type, you can use DEFAULT in