sql模糊查询时遇到下划线的关键字问题

来源:互联网 发布:顾客特殊要求矩阵 编辑:程序博客网 时间:2024/05/08 02:38

select * from infotabel t where t.enterprisename like 'test\_%' escape '\';


可以把\换成其他字符的,同时后面变成了 ESCAPE  + "自定义字符"
如:  select * from infotabel t where t.enterprisename like 'test*_%' escape ‘*';


select * from infotabel t where t.enterprisename like 'test*_%' escape ‘*';