with as的学习
来源:互联网 发布:淘宝小二介入后不满意 编辑:程序博客网 时间:2024/05/16 08:12
在Oracle数据库开发中有时候对临时数据的一些处理,但是这些数据不想放在table里面,而且cursor的灵活性又不是很好,这个时候可以考虑with as 了。
with as 是在内存总建立一个临时表, 可以对这个temp table里面的数据进行整理。
with test as (select 1 from dualunionselect 2 from dualunionselect 3 from dual)select * from test
得到一个temp table就可以对table的记录进行操作了, 例如邱平均数
with table1 as (select 1 as a from dualunionselect 2 as a from dualunionselect 3 as a from dual)select avg(a) from table1
还可以和现有的表进行联合查询。
由于with as 是内存在的table,所以还是比较快的。如果数据比较大的时候建议不要使用with as,不然的话变得很慢。
0 0
- with as的学习
- 学习Python:with...as的用法
- with as学习
- WITH AS的用法
- With as 的用法
- WITH AS的含义
- with as的用法
- with as 的使用说明
- WITH AS的含义
- with as 的使用
- WITH AS的用法
- with as的用法
- with..as oracle的用法
- oracle 的 with as 用法
- with as的update写法
- ORACLE WITH AS 的用法
- with as的使用详解
- oracle with as 的用法
- 瀑布流图片布局
- php-composer 说明
- 缓存设计与 LRU
- phantonjs介绍
- 笔记:C++学习之旅---面向对象程序的设计1
- with as的学习
- 5.7安装注意事项
- 如何在JVM虚拟机挂掉的时候,做一些操作,例如发邮件通知
- 级联CNN人脸检测
- servlet中API总结
- 读大学,究竟读什么 ?
- 如果想在 GC 中生存 1 次怎么办
- 欢迎使用Markdown编辑器写博客
- bootstrap-table操作使用