当前位置:Gxlcms >
数据库问题 >
ORACLE创建临时事务表global temporary table 和 查询时临时表with tempName as (select ) select
ORACLE创建临时事务表global temporary table 和 查询时临时表with tempName as (select ) select
时间:2021-07-01 10:21:17
帮助过:3人阅读
--
Create table
create global
temporary table TEM_FI_COURSE_CONFIG
(
lgart VARCHAR2(
20),
komok VARCHAR2(
20),
sign VARCHAR2(
20),
lgart1 VARCHAR2(
20),
sign1 VARCHAR2(
20),
ktosl VARCHAR2(
20),
bschs VARCHAR2(
20),
bschh VARCHAR2(
20),
konts VARCHAR2(
20),
konth VARCHAR2(
20),
neg_postng VARCHAR2(
20),
col01 VARCHAR2(
20),
neg_postng_deb VARCHAR2(
20),
symko VARCHAR2(
20)
)
on commit delete rows;
查询时临时表with tempName as (select ) select
with as 相当于虚拟视图。
with as短语,也叫做子查询部分(subquery factoring),可以让你做很多事情,定义一个sql片断,该sql片断会被整个sql语句所用到
with tempName as (select ....)
select ...
--针对一个别名
with tmp as (select * from tb_name)
--针对多个别名
with
tmp as (select * from tb_name),
tmp2 as (select * from tb_name2),
tmp3 as (select * from tb_name3),
…
ORACLE创建临时事务表global temporary table 和 查询时临时表with tempName as (select ) select
标签:保存 col varchar tor 问题 char name weight cto