On 17 Feb 2014 at 14:10, Simon Slavin <slav...@bigfraud.org> wrote: 

> On 17 Feb 2014, at 11:37am, Tim Streater <t...@clothears.org.uk> wrote:
>
>> If I have a text column defined as it might be as MYCOL TEXT (that is with no
>> default value), is there a way to distinguish in some row or other between a
>> column into which no data has ever been entered, and a column that might have
>> been set to a string, but later set to the empty string? (or even only ever
>> set to the empty string, perhaps).
>
> In SQL, "no data" means "NUL" whereas an empty string is a string with zero
> characters in.
>
> So just do
>
> SELECT typeof(t) FROM myTable
>
> and see whether you get 'text' or not.

Thanks. I should perhaps have made it clearer that I'm looking at an issue a 
user has. The application gathers some data from the user via a set of fields 
they complete in a browser window, which data is then gathered up and sent 
using ajax to be processed by a PHP script, which writes it to an sqlite db. 
The user complains that some of this data doesn't make it, so I want to pin 
down where in the chain this might be failing. Hence my Q.




--
Cheers  --  Tim
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to