Subject Re: [firebird-support] Re: Why can't CHAR and VARCHAR store binary data (ASCII 0)?
Author David Garamond
peter_jacobi.rm wrote:
> I can test a similiar case OK with the somewhat
> unintuitive ISQL session:
> (using LIKEJAVA charset from my demo fbintl2.dll)

Thanks, I understand now that null-terminated string comes from the
ASCII_CHAR function.

It's nice to know that FB's CHAR/VARCHAR can store binary data, because
as it turns out, MySQL can't (you can't turn off the trimming,
apparently). In MySQL I need TINYBLOB (max 256 byte length) to store
GUID and I can't seem to use TINYBLOB as primary key.

> I assume you should use CHAR(8) and not VARCHAR(8)
> for UUIDs. In fact, I for one, didn't see any useful
> use of VARCHAR instead CHAR, but that's another thread.

Yes, CHAR is the appropriate type here.

Thanks again.