Sql LIKE 语句.字符串结尾 [英] Sql LIKE statement. End Of String
本文介绍了Sql LIKE 语句.字符串结尾的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我必须选择包含特定文本并以 "
、'
、)
或空格字符或此文本结尾的所有字段放在字符串的末尾.
I have to select all fields which contain a specific text and ended with "
, '
, )
or blank space characters or this text is placed in the end of string.
所以,我需要这样的东西:
So, I need something like that:
select *
from MyTable
Where Column1 like '%' + @text + '["'') ]%'
此查询正常工作,直到文本未放置在 Column1
的末尾.
This query works fine until text is not placed in the end of Column1
.
推荐答案
你可以使用
Where Column1 + '"' like '%' + @text + '["'') ]%'
这篇关于Sql LIKE 语句.字符串结尾的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文