首页  >  文章  >  数据库  >  查询[LIKE]SqlServer特殊字符

查询[LIKE]SqlServer特殊字符

WBOY
WBOY原创
2016-06-07 15:40:271204浏览

http://www.dqhxz.com/Post_572.html 如 SELECT @EmailTitle = REPLACE(@EmailTitle,' [ ',' [[] ') --1 SELECT @EmailTitle = REPLACE(@EmailTitle,' % ',' [%] ') --2 SELECT @EmailTitle = REPLACE(@EmailTitle,' _ ',' [_] ') --3 SELECT @EmailTitle =

查询[LIKE]SqlServer特殊字符

http://www.dqhxz.com/Post_572.html


SELECT @EmailTitle = REPLACE(@EmailTitle,'[','[[]')--1
SELECT @EmailTitle = REPLACE(@EmailTitle,'%','[%]')--2
SELECT @EmailTitle = REPLACE(@EmailTitle,'_','[_]')--3
SELECT @EmailTitle = REPLACE(@EmailTitle,'^','[^]')--4

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn