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

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

该sql语句的作用:

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

 

posted @ 2020-09-05 20:00  初仰  阅读(1552)  评论(0编辑  收藏  举报