Temp Table in Oracle

 
Using Temp Tables in Oracle 8i
Oracle 8i introduces the concept of temp tables. This feature long since enjoyed by SQL Server developers enables data to be visible on a Session or Transaction basis. To create an Oracle 8i temp table use the following syntax:
 Create global temporary table tempTable
(
id number,
value number
);
This creates a table that is visible to all sessions, but only the data placed in the table is visible for the current working session. The temp table is resident until the session that created it is closed.

Additionally, temp tables can be created for use on a per-transaction basis. The following syntax creates a temp table that purges all data once a transaction is committed. Or to preserve data once a transaction has been committed, use the "on commit preserve rows" syntax.

 Create global temporary table tempTable
(
id number,
value number
) on commit delete rows;
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值