select * from product where name like ✀%_%✀ escape ✀✀ 我想要查询name 中包含有_的应该怎么办?

2025-01-21 15:33:27
推荐回答(4个)
回答1:

select * from product where name like '%[_]%'
或者
select * from product where name like '%\_%' escape '\'

回答2:

这样写应该就可以了啊
什么数据库?sqlserver、mysql还是oracle?

回答3:

select * from product where name like '%%%' escape '/';

回答4:

select * from t where x like '%\_%' escape '\';