8.在WHERE中使用ANY和ALL条件
  字段 >ANY(值1,值2,值3...):字段值大于集合任何一个
      值就算满足条件。
 
  字段 >ALL(值1,值2,值3...):字段值大于集合中所有
      值才算满足条件。
 
  上述也可以用<ANY,>=ANY,<=ANY. <ALL,>=ALL,<=ALL
//查询工资大于(2000,2500,3000,5000)任何一个值的记录
  select empno,ename,sal
  from emp
  where sal >= ANY(2000,2500,3000,5000);
//查询工资大于(2000,2500,3000,5000)所有值的记录
  select empno,ename,sal
  from emp
  where sal >= ALL(2000,2500,3000,5000);

随机推荐

  1. SQLSERVER数据库还原的时候,报 WITH MOVE 子句可用于重新定位一个或多个文件 的错误,求解决

    http://www.flybi.net/question/4070 梁勇 - 天善智能微软BI首席讲师 数据库备份文件还原产生这个错误的原因是:还原目录下存在多个同名文件, 如图所示,只需要将第2个 ...

  2. centos6安装eclipse

    1. 下载eclipse 我下载的是eclipse-jee-juno-SR2-linux-gtk-x86_64.tar.gz 能够在http://www.eclipse.org/downloads/处 ...

  3. https 证书 certbot-auto执行错误

    报错:ImportError: /root/.local/share/letsencrypt/lib/python2.7/site-packages/cryptography/hazmat/bindi ...

  4. CentOS 6 安装最新的 Redis 2.8 ,安装 TCMalloc

    1,遇到的问题就是 redis 2.8 版本号依赖 Google 的 TCMalloc TCMalloc(Thread-Caching Malloc)是google开发的开源工具──"goo ...

  5. 英语发音规则---F字母

    英语发音规则---F字母 一.总结 一句话总结: 1.F/FF发[f]音? fly [flaɪ] vi. 飞 fine [faɪn] adj. 好的 float [fləʊt] vt. 使漂浮 fra ...

  6. dns tunnel C&C

    通过DNS控制主机以及执行命令 我的ubuntu 安装过程 1854 mkdir dns_tunnel_tool 1855 cd dns_tunnel_tool/ 1856 ls 1857 git c ...

  7. hdoj--2120--Ice_cream's world I(并查集判断环)

    Ice_cream's world I Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Othe ...

  8. 3.linux(ubuntu)常用服务器搭建

    1 ftp 1.1 ftp服务器 1.安装vsftpd服务器 sudo apt-get install vsftpd 2.配置vsftpd.conf文件 sudo vi /etc/vsftpd.con ...

  9. MySQL 5.7 zip 文件安装过程

    1.下载路径 https://dev.mysql.com/downloads/mysql/   有账号登陆下载, 没有账号:no thanks;just start my download   2.解 ...

  10. python一行代码实现9x9乘法表

    for i in range(1,10): for j in range(1,i+1): print('%s * %s = %s ' %(i,j,i*j),end="") prin ...