在derby中,如何在查询时忽略大小写?也就是说,derby中存的数据记录是“Name”,查询时输入“name”也能查询到。
------解决方案--------------------------------------------------------
ij> connect 'jdbc:derby:NoCaseDB;territory=en_US_caseinsensitive;collation=TERRITORY_BASED;create=true';
ij> create table t (x varchar(12));
0 rows inserted/updated/deleted
ij> insert into t values 'hi!','Hi!','hello','Hello','HELLO','HeLlO';
6 rows inserted/updated/deleted
ij> select * from t where x = 'hi!';
X
------------
hi!
Hi!