Thanks for the answer.
I'm using the firefox add-on(sqlite manager).I wrongly guessed that
when creating a table with a field defined as follows:
"start_script" TEXT NOT NULL
so without default, the default would be NULL, while apparently is an
empty string. Indeed, if I try to insert NULL i got an exception.
So, if I want to force the user to insert something, should I add as
default NULL?Or is this a problem with SQLite manager?
Thanks for helping!

On Jan 6, 7:09 pm, Stephen Chrzanowski <pontia...@gmail.com> wrote:
> insert into YourTable (Field1, NotNullField) values ('Empty String','');
> insert into YourTable (Field1, NotNullField) values ('Null Value',NULL);
>
> The first insert one will work, the second will not.
>
> An empty string is NOT considered a NULL value.  An empty string is actually
> considered very valid data.  A value of NULL means that there is no data
> associated to that particular field.
>
> On Wed, Jan 5, 2011 at 12:27 PM, tinauser <tinau...@libero.it> wrote:
> > Hi there,
> > I'm an inexpert user of SQLite.
> > I create a table with a field NOT NULL
> > However i succesfully insert a record with the NOT NULL field empty.
> > Shouldn't this be "forbidden"?
> > Thanks
> > _______________________________________________
> > sqlite-users mailing list
> > sqlite-us...@sqlite.org
> >http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
> _______________________________________________
> sqlite-users mailing list
> sqlite-us...@sqlite.orghttp://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to