基础-SQL-DQL-条件查询

查询没有身份证号的员工信息

  select * from emp where idcard is null;

查询年龄在15岁(包含) 到 20岁(包含)之间的员工信息

  select * from emp where age >= 15 && age <= 20;

  select * from emp where age >= 15 and age <= 20;

  select * from emp where age between 15 and 20;

查询姓名为两个字的员工信息 _ %

  select * from emp where name like '__';

posted @ 2023-05-02 14:29  xycccode  阅读(10)  评论(0编辑  收藏  举报