zoukankan      html  css  js  c++  java
  • where 条件查询

    比较运算符

        >     <     <=     >=     <>    !=

    select   *    from   employee    where   sex='male';

    select   *   from  employee  where   id>10;

    select * from employee where salary between 10000 and 20000;

    select * from employee where salary in (10000,20000);   单独的n个值

    范围

      between  10000   and   20000;      10000到20000之间

      in  (10000,20000)    只有10000或者20000

    模糊匹配

        like    

          %  通配符  表示任意长度的任意内容

          _   通配符   一个长度的任意内容

            select * from employee where emp_name like '程__';

          select   *   from   employee  where   emp_name like 'j%';    

          select * from employee where emp_name like '%l%';     含有l

        regexp    必须是字符串

          select * from employee where emp_name regexp '^j';     以j开头的。

            ‘g$’   以g结尾的

    逻辑运算

        not

            select   *  from  employee  where   salary   not   in  (1000,20000)  and  age =18;

            select    *   from   employee    where   sex='male'  or   post='teacher';

        and

        or

        not

    查看岗位描述部位null

          不能用=     只能用  is     

              select  *   from  employee    where    post_comment    is   not   null;

  • 相关阅读:
    一些信息熵的含义
    scikit-learn包的学习资料
    DB Scan算法的分析与实现
    ps教程连接
    用PS如何把图片调出时尚杂志色
    Linux FIFO读写时堵塞与非堵塞的效果
    yuyv转yuv420p代码及验证代码
    YUV格式介绍
    too many include files depth = 1024错误原因
    开发用小工具
  • 原文地址:https://www.cnblogs.com/ch2020/p/12898007.html
Copyright © 2011-2022 走看看