语法格式:

select 字段1,字段2... from 表名 where 条件;

都有哪些条件?

= 等于

==< > != 这两个符号都是不等于!!!==

<= 小于等于 >= 大于等于

between… and … 等同于 >= and <= 事例:查询学生年龄在10-20之间的人:

select Name,Age from table1 where Age between 10 and 20;

in 包含,事例:

select 字段名 from table1 where 字段名 in (可能取到的值,不是一个区间);

查询那些员工的补贴为空:==is null是重点!!数据库中的null不能用=来衡量!!==

select Name,Comm from table1 where Comm is null;