On Mon Oct 12, 2009 at 02:54:38PM +0200, Robert Roggenbuck wrote:
> I detected that it is possible to enter NULL in a table-column defined as
> PRIMARY KEY. Is it a bug or a feature of the "manifest typing" of SQLite? 
> Or is there something in DBD::SQLite going wrong?

Most likely a 'feature' of SQLite. Running your code manually:

    sqlite> CREATE TABLE TestTable (
        ...>                 a INTEGER PRIMARY KEY,
        ...>                 b INTEGER NOT NULL,
        ...>                 c INTEGER
        ...>                         );
    sqlite> INSERT INTO TestTable VALUES (NULL, 1, NULL);
    sqlite> select * from TestTable;
    1           1           NULL      

Reading http://www.sqlite.org/autoinc.html it appears that SQLite has
an automatic 'autoincrement' feature. Why it converts NULL into auto is
beyond me. I would try perhaps try the same question at:

    http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users 

Cheers,
Mark.
-- 
Mark Lawrence

Reply via email to