> Yeah! I've missed the default option. But is this SQL standard?

Yes.

> sqlite> insert into deftest (i, s) values (NULL,'');

This inserts NULL (not a string) into i and '' into s.
When you retrieve that row using tcl, both are represented
by empty strings.

Default values replace missing values in insert statements,
not null values.  To get your default 'NULL' into i, and an
empty string into s, use

     insert into deftest (s) values ('');

The coalesce function suggested by someone else is also
useful. It let's you have a string representation for NULL
that can be different in different queries, if that's
important to you.

Regards

Reply via email to