On 16 Nov 2015, at 5:51pm, Igor Korot <ikorot01 at gmail.com> wrote:

> It looks like I falsely assumed that it will return an empty string instead.
> Guess I was wrong.

The empty string is a perfectly legitimate default value for a column.  And 
it's not the same as NULL, a different perfectly legitimate default value for a 
column.  These two do not do the same thing:

CREATE TABLE myTable (fred DEFAULT NULL);
CREATE TABLE myTable (fred DEFAULT '');

> Also, are you saying that if I have a integer field with the default value of 
> 1,
> I will not be able to retrieve it with sqliteColumnText()?

Correct.  These two do not do the same thing:

CREATE TABLE myTable (fred DEFAULT 1);
CREATE TABLE myTable (fred DEFAULT '1');

Simon.

Reply via email to