开发者

Wildcard characters sql only alphabet characters

开发者 https://www.devze.com 2023-02-08 16:43 出处:网络
I need to create a rule only for alphabet characters i used the followingWildcard character sequences but didn\'t work !

I need to create a rule only for alphabet characters

i used the following Wildcard character sequences but didn't work !

开发者_开发知识库LIKE '[A-Za-z]'

LIKE 'a-z'

LIKE 'A-Za-z'


Double negative like

WHERE
  SomeCol NOT LIKE '%[^a-z]%'

Ignoring the first NOT, this means "match any character not in the range a to z".

Then, you reverse using the first NOT which means "don't match any character not in the range a to z"

Edit, after comment

LIKE '%[a-z]%' means "find any single character between a-z. So 111s222 is matched for example because s matches in this like.

0

精彩评论

暂无评论...
验证码 换一张
取 消