简体   繁体   中英

sql not case sensitive query without using upper or lower function

I have following query ,

select * from process where name like 'abc';

now the name can be abc or ABC or Abc or aBc , any combination ,

i can not use upper and lower function as this query gets passed to some another system which does not support such functions ,

Also, collate is not supported ie i can not do ,eg .

select * from process where name like 'abc' COLLATE SQL_Latin1_General_CP1_CI_AS

Is there any way to make this query case-insensitive without using upper and lower functions ?

If we can't use:

  1. lower or upper
  2. assing case insensitive collate

Possibly combining all results:

select * from process where name in ('abc', 'aBc', 'ABc', 'aBC', 'abC', 'AbC', 'aBC', 'ABC')

这应该工作:

select * from process where name rlike '[aA][bB][cC]'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM