第四章 select where过滤
来源:互联网 发布:炭知天下电话 编辑:程序博客网 时间:2024/06/05 04:01
假如有一张 学生表
select * from student
列名 可以用别名 表名也可以用别名
select t.name as '名字' from student t
列可以做加减乘除 列也可以自定义常量列
select t.score-1 ,5 as '五'from student t
(t.列名 必须这个表中存在这个列才会显示否则报错)
单词:排序 order by 降序 desc 升序 asc limit 限量
查询前五名的同学的成绩
select t.score from student t order by desc limit 5 (如果有where 要加在order by 前面)
查询成绩为60,90,95的人
select score from student in (60,90,95) (反之则not in)
查询成绩为空的人null
select t.score from student where score is null (反之则 is not)
between 指定两个数之间的值(包含这两个数)
注意:如果where后面有and和or 必须要先算and再算or
0 0
- 第四章 select where过滤
- Oracle select ---------having条件过滤与where条件过滤
- Oracle select ---------having条件过滤与where条件过滤
- 第四章 过滤数据
- WHERE&过滤和排序
- 过滤数据-----where子句
- WHERE NOT EXISTS 过滤
- 数据where条件过滤
- 6 过滤数据:where
- 第四章 键盘的过滤(1)
- SQL必知必会 笔记 第四章 过滤数据
- c# from where select
- hive select where
- IEnumerable.Select和where
- 第四章 第三节:查询SELECT
- 第四章 第五节:INSERT...SELECT
- 【MySql】过滤数据where语句
- 第四课---过滤数据
- _00017 Kafka的体系结构介绍以及Kafka入门案例(初级案例+Java API的使用)
- Java 中Integer的cache
- 网络心跳包处理
- IOS 学习笔记14 内存管理(1)
- ArcGIS Engine中的重点类库介绍
- 第四章 select where过滤
- B/S结构与C/S结构的区别
- 如何利用response.addHeader()方法设置cookie
- IOS沙盒机制(SandBox)
- 动态类型(isKindOfClass, isMemberOfClass,id)等
- obj-c编程10:Foundation库中类的使用(4)[文件管理,查询当前进程信息]
- 第17章 数据库和XML
- IOS 学习笔记14 内存管理(2)内存管理策略
- 全栈JavaScript之路(八)学习 CDATASection 类型 节点