db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alan Burlison <Alan.Burli...@sun.com>
Subject Re: any feedback on this?
Date Tue, 24 Jun 2008 12:45:01 GMT
Rick Hillegas wrote:

> Some people have found it useful to add a CHECK constraint to the table 
> to verify that wrong values aren't leaking into the upper-case column 
> from somewhere in their application. Something like the following can 
> give you more peace of mind:
> 
> create table t
> (
>   lastName varchar( 50 ),
>   normalizedLastName varchar( 50 ),
>   check ( normalizedLastName = upper( lastName ) )
> );

Yeah, I saw that somewhere.  I've decided never to write to the 
case-converted column but to populate it via triggers, that should have 
the same effect.  Thanks for the tip, anyway :-)

-- 
Alan Burlison
--

Mime
View raw message