学习笔记之--047.第二章 限制和排序数据
2015-09-28 10:46
387 查看
语法:select * |{[DISTINCT] column | expression [alias],...} FROM table [WHERE condition(s)];
select employee_id,last_name,job_id,department_id from employees where department_id=90;
=
>
>=
<
<=
<>
BETWEEN...AND...
IN(set)
like
is null
select last_name,salary from employees where salary <=3000;
select last_name,salary from employees where salary salary BETWEEN 2000 AND 3500;select employee_id,last_name,salary,manager_id from employees where manager_id IN (100,102,201); select first_name from employees where first_name like '_S%';
%匹配符 _匹配符逻辑运算
and or not排序
ORDER BY 默认升序,只影响前当前字段.ASC 升序
DESC 降序
本文出自 “雷驰科技工作室” 博客,谢绝转载!
select employee_id,last_name,job_id,department_id from employees where department_id=90;
=
>
>=
<
<=
<>
BETWEEN...AND...
IN(set)
like
is null
select last_name,salary from employees where salary <=3000;
select last_name,salary from employees where salary salary BETWEEN 2000 AND 3500;select employee_id,last_name,salary,manager_id from employees where manager_id IN (100,102,201); select first_name from employees where first_name like '_S%';
%匹配符 _匹配符逻辑运算
and or not排序
ORDER BY 默认升序,只影响前当前字段.ASC 升序
DESC 降序
本文出自 “雷驰科技工作室” 博客,谢绝转载!
相关文章推荐
- 如何将jpg转换成pdf的转换方法
- 项目总结一:微孵化项目总结
- Kafka+Storm+HDFS整合实践
- ASP.NET 5 MVC6系列教程 (四):向视图中添加服务和发布应用到公有云
- 【springmvc+mybatis项目实战】杰信商贸-28.POI百万数据打印
- SecureCRT 连接linux 虚拟机连接问题
- 用java来实现线程之间的wait、notify()通信
- C语言:排序算法
- 米花读后感_开发选择Block还是Delegate
- Yii2.0 对数据库 查询的简单操作
- jQuery、layer实现弹出层的打开、关闭
- 数字证书 从零了解
- 黑马程序员——java高新技术(新特性、反射、泛型)
- linux复制,网络报错
- DataStage 一、安装
- flume-ng+Kafka+Storm+HDFS 实时系统搭建
- ASP.NET 5 MVC6系列教程 (三):view components介绍
- ::before和::after伪元素的用法
- C++ int main(int argc,char* argv[])详解
- 5秒钟抢光iPhone 6s 黄牛是怎么做到的?