一.条件查询 where
1.等值查询 =
select * from student where id=1;
2.不等值查询 != (< >)
查询年龄不是20岁的学生信息
select * from student where age!=20;
3.关系比较查询 < <= > >=
查询年龄不是20岁的学生信息
select * from student where age>20;
4.逻辑运算查询 and or
and 满足所有条件 or只需要满足其中一个条件
查询年龄是小于20岁并且住址是信阳
select * from student where age<20 and address="信阳";
查询年龄小于20岁或者住址是信阳的
select * from student where age<20 or address="信阳";
5.区间查询 between .. and (包含边界值)
查询年龄是18岁和21岁之间
select * from student where age between 18 and 21;
select * from student where age>18 and age <21;
6.模糊查询