我是sql的新手,我想知道如何在名为Name
?的列的末尾找到字母或符号?例如,如果我会找到我会写的东西,select * from 'table' where 'Name' like '%es%'
但它会发现我所有的行包含es
让我们说 - lesl, pespe, mess
...但是如何编写选择哪个将选择仅'es'
在字的末尾的值 ?...使用regex
我将使用 es\Z
.....提前感谢!
Joh*_*Woo 13
你必须删除最后一个%
,所以它只会选择以.结尾的单词es
.
select * from table where Name like '%es'
Run Code Online (Sandbox Code Playgroud)
您目前正在匹配: ..where 'Name' like '%es%'
.
这相当于anything, then 'es' then anything else
.
删除最后一个%
更改的位置
anything then 'es'
.
总之..你需要 ..where 'Name' like '%es'
归档时间: |
|
查看次数: |
65788 次 |
最近记录: |