Hi all,
i noticed the note in the documentation that the implicit NOT NULL
constraint for PRIMARY KEYs is currently not enforced by SQLite and
wondered if there is an explicit way to set it?
I expected specifying the NOT NULL explicitly would work and enforce it,
but it does not:
CREATE TABLE foo (a INTEGER NOT NULL, b TEXT, PRIMARY KEY(a) );
Inserting a NULL into column a works fine, this does not raise an error.
INSERT INTO foo VALUES (NULL,'bar');
Is the only workaround creating a trigger that calls RAISE(FAIL,...)?
Michael
--
Michael Schlenker
Software Engineer
CONTACT Software GmbH Tel.: +49 (421) 20153-80
Wiener Straße 1-3 Fax: +49 (421) 20153-41
28359 Bremen
http://www.contact.de/ E-Mail: [EMAIL PROTECTED]
Sitz der Gesellschaft: Bremen | Geschäftsführer: Karl Heinz Zachries
Eingetragen im Handelsregister des Amtsgerichts Bremen unter HRB 13215
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------