繁体   English   中英

sql不区分大小写,不使用大写或小写函数

[英]sql not case sensitive query without using upper or lower function

我有以下查询,

select * from process where name like 'abc';

现在名称可以是abc或ABC或Abc或aBc,任意组合,

我无法使用大写和小写函数,因为此查询被传递给另一个不支持此类函数的系统,

此外,不支持整理,即我不能,例如。

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

有没有办法在不使用上下函数的情况下使这个查询不区分大小写?

如果我们不能使用:

  1. 低或高
  2. 对案例不敏感的整理

可能结合所有结果:

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

这应该工作:

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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