常用符号
> < <= >= = <>(不等于)in ---- 代表的范围
select * from stu
where math
= 88;
select * from stu
where math
in (18,88,90);
is null 因为(= 和 <>)不能判断null值,所以要采用is null或者 is not null 来进行null值判断。
like ---- 模糊查询
select * from stu
where username
like '张_';
select * from stu
where username
like '张%';
like '%张';
like '%张%';
and ---- 与 or ---- 或 not ---- 非 between … and <=> ----安全等于,用于判断前后是否等于,等于返回true
================================================================================== is null 和 <=> is null :仅仅可以判断NULL值,可读性较高 <=>:既可以判断NULL,又可以判断普通的数值,但是可读性较低