比较运算符
来源:互联网 发布:流量刷 源码程序 编辑:程序博客网 时间:2024/06/05 10:20
> / < / >= / <= / != / <> /IS NULL / Like / Between / In / Exsist
-- 判断 null 值select * from n5 where s is null;select * from n5 where s is not null;-- like 模糊查询。慎用,有可能会导致全表扫描,效率低。-- % 匹配0到多个字符,_ 匹配一个字符select username from dba_users where username like 'VI_';select username from dba_users where username like 'SC%';select username from dba_users where username like '%SC%';-- in,是 where x = a or x = b or x = c 的一种缩写。下面两条是等价的。select * from emp where empno in (700, 800, 900);select * from emp where empno = 700 or empno = 800 or empno = 900;-- in 后面跟的不一定是逗号分隔的单项,也可能是一个完整的查询语句。-- 下面两条结果是一致的-- 这种 in 慎用select * from emp where deptno in (select deptno from dept where dname = 'SALES');select a.* from emp a,dept d where a.deptno =d.deptno and d.dname='SALES';-- between...andselect * from emp where empno between 7800 and 9000;-- 等同于:select * from emp where empno >= 7800 and empno <= 9000;
阅读全文
0 0
- 使用比较运算符
- bash 比较运算符
- bash 比较运算符
- PHP比较运算符
- bash 比较运算符
- nhibernate 比较运算符
- c#比较运算符
- php 比较运算符
- linux 比较运算符
- PHP比较运算符
- PHP比较运算符
- 运算符比较
- 比较运算符
- 比较运算符
- 比较运算符
- swift-比较运算符
- 比较运算符
- mongoDB 比较运算符
- 1005继续3n+1猜想(Hash散列)
- 118/119. Pascal's Triangle/II
- caffe 中的一些参数介绍
- 第一周
- NGUI_的Button学习_004
- 比较运算符
- python3.6安装opencv
- 字符串的基本操作
- Excel判断身份证号码数据的第17或15位数字的奇偶性决定男女性别
- vlan的三种划分方式、pvlan和网段(子网)的关系
- d3学习资料收集
- 关于raw文件夹和assets文件夹
- Android 面试常问七道题
- 第二周