【oracle资料整理】--【4】基本查询
2008-04-11 20:01
471 查看
查询 select
select * from student;
select xh,xm,sex from student;
select * from student where xh like 'A%1'; %任意多个字符
select * from student where xh like 'A__1'; _1个字符
select * from student where xh like '%A%';
select * from student where xh like 'A%';
select * from student where xh like '%A';
select * from student where xh = 'A%';
select * from student
order by birthday ; 升序 (order by birthday asc;)
select * from student
order by birthday desc; --降序
select * from student
order by birthday desc,xh asc; --按birthday 降序 按xh升序(asc/默认)
select * from student
where sex='女' or birthday='1999-02-01';
select * from student
where sex='女' and birthday='1999-02-01';
select * from student
where salary > 20 and xh <> 'B002'; (!=)
select * from student;
select xh,xm,sex from student;
select * from student where xh like 'A%1'; %任意多个字符
select * from student where xh like 'A__1'; _1个字符
select * from student where xh like '%A%';
select * from student where xh like 'A%';
select * from student where xh like '%A';
select * from student where xh = 'A%';
select * from student
order by birthday ; 升序 (order by birthday asc;)
select * from student
order by birthday desc; --降序
select * from student
order by birthday desc,xh asc; --按birthday 降序 按xh升序(asc/默认)
select * from student
where sex='女' or birthday='1999-02-01';
select * from student
where sex='女' and birthday='1999-02-01';
select * from student
where salary > 20 and xh <> 'B002'; (!=)
相关文章推荐
- Oracle零碎要点---多表联合查询,收集数据库基本资料
- Oracle中查询表字段基本信息、主键、外键(整理)
- 【oracle资料整理】--【7】子查询,层次查询,TOP 前几行,分页查询
- Oracle中查询表字段基本信息、主键、外键(整理)
- 七、Oracle数据库之学习笔记---Oracle的表的基本查询(4)
- Informix数据表结构分析资料整理之约束查询代码
- Oracle中查询主键、外键、sequence、表基本信息等
- Oracle基本查询 二
- Oracle 查询优化的基本准则详解
- 22、oracle:Select 语句执行顺序以及如何提高Oracle 基本查询效率
- Oracle学习之路(一):oracle简介+基本sql语句+条件查询+排序数据理论与案例
- Oracle SQL查询每组中某个字段最大的那笔资料
- 四、Oracle数据库之学习笔记---Oracle的表的基本查询(1)
- Oracle基本操作五:简单查询与简单函数,组函数,分组
- Oracle 查询优化的基本准则详解
- SQL server 与Oracle开发比较(同事帮忙整理的,放这里方便查询)
- oracle基本笔记整理及案例分析2
- oracle 基本查询 查看排名
- oracle 基本查询
- Oracle基本操作--数据查询