问题描述
是sql的新手,我想知道如何在名为Name
的列中的值末尾找到字母或符号?例如,如果我发现我会写select * from 'table' where 'Name' like '%es%'
的东西,但它将发现我所有包含es
的行可以说-lesl, pespe, mess
...但是如何编写select来选择单词末尾的'es'
值呢? ...使用regex
,我将使用es\Z
.....,谢谢!!
iam new to sql and i would like to know how can I find the letter or symbol at the end of value in column called Name
?E.g if i would find something i will write select * from 'table' where 'Name' like '%es%'
but it will find me all rows contains es
Lets say - lesl, pespe, mess
... but how to write select which will select just values with 'es'
At the end of word? ... using regex
i will use es\Z
..... thanks in advance!
推荐答案
您必须删除最后一个%
,因此它只会选择带有es
的 end 单词.
You have to remove the last %
, so it will only select words ending with es
.
select * from table where Name like '%es'
这篇关于SQL-如何选择单词末尾具有特定值的单词的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!