I'm recording this behaviour:
sqlite> create table test(f integer primary key autoincrement, v integer
default 0);
sqlite> insert into test(f) values(NULL);
sqlite> insert into test(f) values(NULL);
sqlite> insert into test(f) values(NULL);
sqlite> select * from test;
1|0
2|0
3|0
this is very nice...
sqlite> create table test(f integer primary key, v integer default 0);
sqlite> insert into test(f) values(NULL);
sqlite> insert into test(f) values(NULL);
sqlite> insert into test(f) values(NULL);
sqlite> select * from test;
1|0
2|0
3|0
this is a bit surprising; where does the autoincrement-like behaviour
come from? without an explicit autoincrement definition, I would expect
something like 'ERROR: null value in column "f" violates not-null
constraint' (for all inserts) or at least 'SQL error: PRIMARY KEY must
be unique' (for all inserts after the first), depending on whether we
want to allow NULL primary keys or not.
sqlite> create table test(f char(24) primary key, v integer default 0);
sqlite> insert into test(f) values(NULL);
sqlite> insert into test(f) values(NULL);
sqlite> insert into test(f) values(NULL);
sqlite> select * from test;
|0
|0
|0
what is going on here? I'm having three records with the same NULL
primary key.
regards,
MF
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------