On 23/05/2009 10:56 AM, Greg and Tracy Hill wrote:
> Is it possible to use the BLOB literal sytax X'ABCD' with encoded NULLs?
>
> For example:
>
> INSERT INTO mytable VALUES (X'BADF00D0')
I see no NULL here, encoded or otherwise.
I don't even see an ASCII NUL here; NUL is character terminology,
whereas the topic is BLOBs, and BLOBs are *B*inary.
> When I do this, the length of the data is 2 instead of the expected 4.
Well, if you concatenate a BLOB containing x'00' with a TEXT item,
you'll get NULs:
sqlite> select length(x'00000000');
4
sqlite> select length('xxx' || x'00000000' || 'zzz');
3
sqlite>
Don't do such things; treat BLOBs as *B*inary objects.
HTH,
John
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users