一、有效通配符: 1.百分比通配符(%):任何0个或多个字符的字符串。 2.下划线通配符(_):任何单个字符。 3.[list of characters]通配符:指定集合中的任何单个字符。 4.[character-character]通配符:指定范围内的任何单个字符。 5.[^]通配符:不在列表或范围内的任何单个字符。
注意:LIKE模糊查询默认不区分大小写。 示例: 
结果: 
通配符使LIKE运算符比等于(=)和不等于(!=)字符串更灵活。 二、有效通配符示例 1.百分比通配符(%) 示例: 
结果: 
2.下划线通配符(_) 使用一个下划线代表只查询只有一个字符串的数据,使用两个下划线代表只查询两个字符串的数据,以此类推… 示例和结果(一个下划线): 
示例和结果(两个下划线): 
值得一提的是,百分比通配符可以和下划线通配符一起组合使用,它们也是上面提到的有效通配符中最为常用的通配符。示例如下(在“FullCode”字段中查询第二个字符是“h”的数据): 
3.[list of characters]通配符 示例(在“FullCode”字段中查询第一个字符为“a或b或c”的数据): 
4.[character-character]通配符 [character-character]通配符与[list of characters]通配符极为相似,如果需要查询的数据具有顺序性,例如1-9,a-z诸如此类的数据,建议使用[character-character]通配符。 示例(在“FullCode”字段中查询第一个字符是“a-g”的数据): 
5.[^]通配符 示例(在“FullCode”字段中查询第一个字符不是“a-g”的数据): 
|