declare @t table(n varchar(10)) insert into @t select '^' union all select '123123' select * from @t where charindex('^',n)>0 /* (2 行受影响) n ---------- ^(1 行受影响)*/
declare @t table(n varchar(10)) insert into @t select '^' union all select '123123' select * from @t where n like '%^%'/* (2 行受影响) n ---------- ^(1 行受影响)*/
insert into @t
select '^' union all
select '123123' select * from @t where charindex('^',n)>0
/*
(2 行受影响)
n
----------
^(1 行受影响)*/
declare @t table(n varchar(10))
insert into @t
select '^' union all
select '123123' select * from @t where n like '%^%'/*
(2 行受影响)
n
----------
^(1 行受影响)*/
title like '%[^]%'