Home  >  Article  >  Database  >  查询[LIKE]SqlServer特殊字符

查询[LIKE]SqlServer特殊字符

WBOY
WBOYOriginal
2016-06-07 15:40:271202browse

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

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn