Oracle with as使用小节
来源:互联网 发布:视差js原理 编辑:程序博客网 时间:2024/06/07 00:25
Oracle中的with as使用
1.前言
Oracle 数据库中的操作 with as 是一个子查询,该子查询是将查询的数据放入Oracle的临时表中,为后续查询提供筛选数据。
2.基本语法
with tempTablbeName as (select * from table1)select * from tempTablbeName
需要注意的是,with as 是和select 配合使用的,因为临时表创建了就为查询使用的,如果后续没有select查询语句Oracle会报错
2.1创建一个临时表
with temp as (select * from tb_name)
2.2创建多个临时表
with temp1 as(select * from tb_name1), temp2 as(select * from tb_name1), temp3 as(select * from tb_name1)
3.扩展
with as 子查询与union配合使用,可以提高查询的灵活性,常见形式如下
with table1 as( select 1 as a from dual union select 2 as a from dual union select 2 as a from dual )
4.结束语
with as 创建的临时表,是放到Oracle中的临时表空间中,查询完毕后就被清除了。关于临时表空间和表空间是另外的知识了
阅读全文
0 0
- Oracle with as使用小节
- AS ndk 使用小节
- oracle中with as语句的使用
- Oracle 使用 with as 优化重复查询
- ORACLE WITH AS 用法
- ORACLE WITH AS 用法
- oracle with as
- oracle with as
- oracle :with as
- ORACLE WITH AS 语法
- oracle with as 语法
- oracle with as 语法
- ORACLE WITH AS 用法
- Oracle WITH AS 用法
- ORACLE WITH AS 用法
- ORACLE WITH AS 用法
- oracle with as 用法
- ORACLE WITH AS 用法
- composer 安装和换源
- 【Android
- oracle导入导出。
- HTML-超文本标记语言
- 行为型模式之策略模式实现
- Oracle with as使用小节
- 卢俊卿欢迎荷兰前首相科克夫妇访问天九集团
- Linux SoftEther VPN Client 使用说明
- TensorFlow 介绍 tf.concat 的使用方法
- document.write设置样式
- 程序员必知之前端演进史
- android中textview文本滚动效果
- 【微信小程序开发】来看看,那些年我们踩过的坑~
- AffinityBasedMattingToolbox