1、SELECT * FROM dbo.tb_Test
2、SELECT * FROM dbo.tb_Test WHERE name LIKE '%c_%'
3、SELECT * FROM dbo.tb_Test WHERE name LIKE '%c_%' escape '\'
4、SELECT * FROM dbo.tb_Test WHERE name LIKE '%c\_wd' escape '\'
以上是我的测试数据,只有第四个符合要求(escape '\')
1、SELECT * FROM dbo.tb_Test
2、SELECT * FROM dbo.tb_Test WHERE name LIKE '%c_%'
3、SELECT * FROM dbo.tb_Test WHERE name LIKE '%c_%' escape '\'
4、SELECT * FROM dbo.tb_Test WHERE name LIKE '%c\_wd' escape '\'
以上是我的测试数据,只有第四个符合要求(escape '\')
转载于:https://www.cnblogs.com/wyy226wyj/p/4024082.html