日期:2014-05-17 浏览次数:20888 次
--CREATE TABLE table0(id INT, url VARCHAR(256))
--INSERT INTO TABLE0
--SELECT 0 , 'aa\bb\cc\dd a.pdf'
--UNION ALL
--SELECT 1, 'aa\bb\cc\dd a.exe'
--UNION ALL
--SELECT 2, 'aa\bb\xx\tt.pdf'
select * from table0 where url like 'aa\bb\cc\dd a.%'
/*
id url
----------- ----------------------------------------------------------------------------------------------------------------
0 aa\bb\cc\dd a.pdf
1 aa\bb\cc\dd a.exe
(2 行受影响)
*/
select * from table
where url like '%'+char(13)+'%'
or url like '%'+char(10)+'%'
or url like '%'+char(32)+'%'
or url like '%'+char(9)+'%'