首页 > 其他分享 >条件查询

条件查询

时间:2022-10-05 13:00:52浏览次数:40  
标签:... 条件 查询 字段 等于 null

什么是条件查询

  • 不是将表中所有数据都查出来。是查询出来符合条件的
    语法格式:select 字段1,字段2,字段3... from 表名 where 条件;
  • 都有哪些条件:
    = 等于
    查询薪资等于800的员工姓名和编号?select empno,ename from emp where sal = 800;
    <>或!= 不等于
    < 小于
    <= 小于等于

大于
= 大于等于
between...and... 两个值之间,等同于>= and <=
is null 为null(is not null不为空)
and 并且
or 或者
in 包含,相当于多个or(not in不在这个范围中)
not not可以取非,主要用在 is 或 in 中

标签:...,条件,查询,字段,等于,null
From: https://www.cnblogs.com/song-hua/p/16755411.html

相关文章