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 Tue, 27 Dec 2005 17:25:34 GMT
Thomas Dudziak wrote:

> Hi there,
> I'd like to specify a default value for a (VAR)CHAR FOR BIT DATA
> columns when creating a table. Is this possible with Derby, even if
> the default value contains unprintable (non-ascii) characters ?

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

I tried to find a link to constant/literal syntax in the ref manual but
I failed. I thought I'd seen where this syntax is documented.


View raw message