zoukankan      html  css  js  c++  java
  • MySQL IN和NOT IN关键字

    mysql> select * from student;
    +------+------+-----------+
    | age  | name | address   |
    +------+------+-----------+
    |   12 | Jack | BeiJing   |
    |   19 | Mike | TianJin   |
    |   21 | Rose | ZhuHai    |
    |   23 | Ann  | ShangHai  |
    |   27 | Alis | ShenZhen  |
    |   55 | Make | GuangZhou |
    +------+------+-----------+
    6 rows in set (0.00 sec)

    mysql>

    # in表示在集合中查找
    
    mysql> select * from student where age in(19, 20, 23); +------+------+----------+ | age | name | address | +------+------+----------+ | 19 | Mike | TianJin | | 23 | Ann | ShangHai | +------+------+----------+ 2 rows in set (0.08 sec)
    # not in表示不在集合中 mysql
    > select * from student where age not in(19, 20, 23); +------+------+-----------+ | age | name | address | +------+------+-----------+ | 12 | Jack | BeiJing | | 21 | Rose | ZhuHai | | 27 | Alis | ShenZhen | | 55 | Make | GuangZhou | +------+------+-----------+ 4 rows in set (0.00 sec) mysql>
  • 相关阅读:
    Matlab中fsolve传递系数变量
    MongoDB安装与启动
    Java Runnable与Callable区别
    Java创建线程的两种方式
    VC++记录
    spring-boot-mybatis
    spring-boot-mongodb
    SpringBoot helloworld
    mysql进行时
    java多线程对CountDownLatch的使用实例
  • 原文地址:https://www.cnblogs.com/Robotke1/p/3054383.html
Copyright © 2011-2022 走看看