1.检查单个值
SELECT column_name1,column_name2 FROM table_name WHERE column_name1 = value;
分析:返回column_name1 = value的一行,MYSQL在执行的时候默认不区分大小写
2.范围值检查
SELECT column_name1,column_name2 FROM table_name WHERE column_name1 BETWEEN 5 AND 10;(包括5和10)
3.空值检查
SELECT column_name FROM table_name WHERE column_name IS NULL;(返回column_name是空的行。)
NOTE:在过滤数据时,一定要验证返回的数据中确实给出了被过滤列具有NULL的行