db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Boynes <jboy...@apache.org>
Subject Re: Case Sensitive
Date Fri, 04 Mar 2005 04:12:59 GMT
Devang wrote:
> Suppose a table contain a same name with different case. How to retervie
> that all records from table.
> I hope u understand the question.
> 

SELECT name FROM foo WHERE UPPER(name) = UPPER('dEvAnG')

would find all 3 using a tablescan.

INSERT INTO foo(name, allUpper) VALUES ('dEvAnG', UPPER('dEvAnG'))
SELECT name FROM foo WHERE allUpper = UPPER('dEvAnG')

may use an index on allUpper improving performance at the cost of 
storing the data twice.

--
Jeremy

Mime
View raw message