一、比较操作符
主要为:=、>、<、!=
二、逻辑操作符
(1)is null
(2)between
select * from user where id between 2 and 5;
(3)in
select * from user where id in (3,5);
(4)like
通配符:% 0至多个字符
_ 一个数字或字符
select * from user where name like '%1%';
(5)exists 搜索指定表里是否存在满足特定条件的记录
select phone from user where exists (select * from user where id<6);
(6)all 用于把一个值与另一个集合里的全部值进行比较
例如:求出user表中id大于平均值的记录
select * from user where id > all (select avg(id) from user);
(7)any 用于把一个值与另一个列表中的任意值进行比较,对比all来理解
(8)some any的别名
三、连接操作符
连接操作符有:and、or
四、求反操作符
主要有:not
五、算术操作符
主要有:+ 、- 、 * 、 /