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 00:11:48 GMT
Suavi Ali Demir wrote:

> for case insensitive index, you can have another column that holds lower-case version
of your original column. you can create an index on that lowercase column and use it in your
sql. you can use triggers to maintain the lowercase column.

Something like this seems to work:

create table test (a varchar(20), ua varchar(20));
create trigger t1 after insert on test for each row
     update test set ua = upper(a);
create trigger t2 after update of a on test for each row
     update test set ua = upper(a);

Does that look sane?

-- 
Alan Burlison
--

Mime
View raw message