SQL语句中的REGEXP'[^abc]'

select * from Table where UserName REGEXP'[^abc]bob';

该sql语句的作用:

查询表Table中的UserName,并且该UserName不包含‘abc’中的任何一个或多个字符(即不能出现带有‘a或b或c’的UserName),并且该UserName字段要包含'bob'

原文地址:https://www.cnblogs.com/cdlyy/p/13619476.html