通配符^与not like 区别

不在指定范围(例如 [^0-9])或集合(例如 [^abcdef])内的任何单个字符

\*查询不在学号不是000001~000004的学生信息*\

\*错误*\

SELECT *

FROM tb_StuScore

WHERE Math_Score  LIKE '00000[^1-4]'

\*正确*\

SELECT *

FROM tb_StuScore

WHERE Math_Score NOT LIKE '00000[1-4]'

 

posted @ 2017-09-06 10:50  专住  阅读(434)  评论(0编辑  收藏  举报