Reputation: 1
I am trying to match a string against one of three possible entries. Right now I have
select * from table x
where column1 like '%INSERT%'
or column1 like '%Insert%'
or column1 like '%insert%';
I'm wondering if there is a more efficient way to do this, maybe using 'in' and 'like' in conjunction?
Upvotes: 0
Views: 43
Reputation: 16001
From Oracle 12.2 (CI
is case-insensitive, AI
is accent-insensitive as well as case-insensitive):
where column1 collate binary_ci like '%insert%'
Earlier
where regexp_like(column1, 'insert', 'i')
or
where upper(column1) like '%INSERT%'
Documentation: Oracle Database 19c Linguistic Sorting and Matching
Upvotes: 2