SELECT * FROM TB WHERE address LIKE '%[[]%' AND address LIKE '%[]]%'
where name like '%[[]%'
select * form tb where address like '%[%' ESCAPE '['
--> 测试数据: [tb] if object_id('[tb]') is not null drop table [tb] create table [tb] (nickname int,address varchar(51)) insert into [tb] select 123456,'[厂商发货!](厂商送货)江苏省苏州市吴江市松陵镇东牛角' union all select 12345,'[厂商发货!(厂商送货)江苏省苏州市吴江市松陵镇东牛角' union all select 1234,'厂商发货!](厂商送货)江苏省苏州市吴江市松陵镇东牛角'--开始查询 select * from [tb] where [address] like '%/[%/]%' ESCAPE '/'--结束查询 drop table [tb]/* nickname address ----------- --------------------------------------------------- 123456 [厂商发货!](厂商送货)江苏省苏州市吴江市松陵镇东牛角(1 行受影响)
--> 测试数据: [tb]
if object_id('[tb]') is not null drop table [tb]
create table [tb] (nickname int,address varchar(51))
insert into [tb]
select 123456,'[厂商发货!](厂商送货)江苏省苏州市吴江市松陵镇东牛角' union all
select 12345,'[厂商发货!(厂商送货)江苏省苏州市吴江市松陵镇东牛角' union all
select 1234,'厂商发货!](厂商送货)江苏省苏州市吴江市松陵镇东牛角'--开始查询
select * from [tb] where [address] like '%/[%/]%' ESCAPE '/'--结束查询
drop table [tb]/*
nickname address
----------- ---------------------------------------------------
123456 [厂商发货!](厂商送货)江苏省苏州市吴江市松陵镇东牛角(1 行受影响)