On 3/6/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Dennis Cote <[EMAIL PROTECTED]> wrote: > > > > It is worth noting that SQLite's behavior is not completely consistent. > > If the column is declared to be an 'integer primary key', then SQLite > > will insert a "default" value even when the user explicitly supplies a > > NULL value in an insert statement. > > > > Remember that PRIMARY KEY implies NOT NULL.
That's not 100% true. In ms sql server this behaviour is a user option. You can set the 'identity' property for a table. This allows you to explicitly specify the key column on insert (unique constraint still applies), or the server inserts the value for you and fails the insert if you specify a key value. It's primarily used in replication so the related keys don't change.