1、比较谓词:

=、<、>、<>


2、like:
模糊查询 _代表一个字符,%代表0个或者多个字符:

select * from student where sid like '_1%'

表示sid的第二个字符是1的所有数据


3、between:

select * from student where sage between 19 and 21

范围查询,包含端点的值


4、is null\is not null:
用来判断空值情况的

select * from student where ssex is not null

 

5、in:

select * from student where sid in(select sid from student where ssex='')

查询所有性别为男性的信息(语句不需要这么写,只是为了说明in谓词),同样的有not in


6、exists:
判断是否存在满足某种条件的记录,exist谓词的主语是记录;
EXIST只关心记录是否存在,返回哪些列都没有关系
对应的是not exist

相关文章:

  • 2021-05-18
  • 2022-02-09
  • 2022-12-23
  • 2021-08-16
  • 2021-12-23
  • 2021-12-25
猜你喜欢
  • 2022-12-23
  • 2021-12-08
  • 2021-08-09
  • 2022-12-23
  • 2021-10-29
  • 2021-12-08
相关资源
相似解决方案