- 5
- 0
- 约6.45千字
- 约 6页
- 2017-01-06 发布于重庆
- 举报
Oracle常用基本语句查询创建等
查询块
批量查询
SQLselect * from emp where in(123,456,789); //查询一个条件的多个情况的批量处理
查询某个数据行的某列为空的数据的相关数据
SQL select * from emp where mgr is null;
条件组合查询(与、或)
SQLselect * from emp where (sal500 or job=’MANAGER’) and ename like ‘J%’;
Order by 排序
【1】SQLselect * from emp order by sal (asc); //从低到高[默认]
【2】SQLselect * from emp order by sal desc; //从高到低
【3】SQLselect * from emp order by deptno (asc),sal desc; //组合排序
【4】SQLselect ename,sal*12 “年薪” from emp order by “年薪” (asc);
SQL select ename,(sal+nvl(comm,0))*12 as 年薪 from emp order by 年薪;
资料分组(max、min、avg、sum、count)
SQLselect max(sal),min(sal) from
您可能关注的文档
最近下载
- 人教版八上历史知识点.doc VIP
- 数字电路与逻辑设计(第3版)2500.pptx VIP
- CSCO肿瘤姑息治疗与安宁疗护指南(2026版).docx VIP
- 校园文创产品设计创意案例分析.pptx VIP
- 国家歌词成龙刘媛媛.docx VIP
- 资料员隐蔽工程填写实操手册(电子版) - 调整方向.pdf VIP
- 新质生产力背景下(2026)《JBT 13448-2018螺杆柱塞式塑料注射成型机》数智化转型应用指南.pptx VIP
- 信息通信网络线务员岗位现场作业操作规程.docx VIP
- 2026年渠道维护工(技师)技能理论考试题库(含答案).docx
- 检验科标本溢洒处理课件.pptx VIP
原创力文档

文档评论(0)