db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel John Debrunner <...@debrunners.com>
Subject Re: Default value for (VAR)CHAR FOR BIT DATA columns ?
Date Wed, 28 Dec 2005 00:18:11 GMT
Thomas Dudziak wrote:

> On 12/27/05, Daniel John Debrunner <djd@debrunners.com> wrote:
>>Yes. Use literals/constants that represent VARCHAR FOR BIT DATA.
>>create table t ( b varchar(20) for bit data default X'CAFE')
>>The default here would be 0xCAFE
> Yes, I thought it would be something like that (without the X though).
> But how do I specify characters in e.g. the range 0 - 32 ? Is there
> something like an escape syntax ? Or can I use Base64 or hex ?

The value is hex, not ASCII characters. Two characters, each in the
range 0-F represent a single byte.

X'07' is the byte value 0x07.


View raw message