Avatar of fpinheiro
fpinheiro
 asked on

CASE INSENSITIVE ON ORACLE 10G

How to set a oracle 10g database to case-insensitive at database level ?
Oracle Database

Avatar of undefined
Last Comment
fpinheiro

8/22/2022 - Mon
Sean Stuber

sorry, you can't


johnsone

Oracle Text would be as case insensitive as you can get.  That allows case insensitive searching, but does require some setup and maintenance.
Sean Stuber

yes,agreed, but even that is a full "database" level change.  Oracle Text would only apply to data stored within the context of that feature.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
johnsone

Yes.  I just wasn't sure what exactly they are looking for and wanted to put it out there as an option.  A lot of times people are looking for case insenstive searching.

As far as sql statements go, oracle is case insensitive, as long as you did not create the column names in mixed or lower case on purpose, which most people do not.

select test_col from test_tab;

yields the same results as

SELECT TEST_COL FROM TEST_TAB;
Sean Stuber

yes,  fpinheiro, johnsone brings up a good point.  Case sensitivity is relative to what you are doing.

Or maybe that's the point of your question.

Can you elaborate?
fpinheiro

ASKER
I need case-insensitive for the data in tables, not in name objects.

like this
in the select above
select name from table where name = 'Robert'

possible results are:
ROBERT
robert
Robert
RoBeRt



⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
johnsone

Then you would need Oracle Text.  A Oracle Text index would need to be created on each column that you wanted case insensitive searching on.

The only other way would be to create function based indexes on UPPER(<col>) and then in all you queries specify WHERE UPPER(<col>) = UPPER('Robert').
ASKER CERTIFIED SOLUTION
Sean Stuber

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
fpinheiro

ASKER
Its not exactly what I wanted, but is a good alternated solution.