只在會話期間或在事務處理期間存在的表.
臨時表在插入資料時,動態分配空間
複製**
**如下:
create global temporary table temp_dept
(dno number,
dname varchar2(10))
on commit delete rows;
insert into temp_dept values(10,'abc');
commit;
select * from temp_dept; --無資料顯示,資料自動清除
on commit preserve rows:在會話期間表一直可以存在(保留資料)
on commit delete rows:事務結束清除資料(在事務結束時自動刪除表的資料)
除法:複製**
**如下:
select mod(65,50) from dual --取餘
select trunc( 65/33) from dual -- 取整 trunc (1.9) = 1
select ceil(65/60) from dual -- 取整 ceil(1.1) = 2
Oracle中的臨時表用法彙總
1 語法 在oracle中,可以建立以下兩種臨時表 1 會話特有的臨時表 create global temporary on commit preserve rows 2 事務特有的臨時表 create global temporary on commit delete rows create g...
oracle中的臨時表用法彙總
oracle 中的臨時表用法彙總 說明 下文中的一些說明和示例 摘自 csdn,恕不一一指明出處 在此一併對相關作者表示感謝 1 語法 在 oracle 中,可以建立以下兩種臨時表 1 會話特有的臨時表 create global temporary on commit preserve rows ...
Oracle中臨時表
最近考慮到我們的資料庫端寫儲存過程關於臨時表使用的情況,由於我們 現在還不清楚資料庫端到底是怎麼處理的,是否和sql server的處理方式相 同,是否會存在隱患等等一些問題,為了避免將來不必要的麻煩我做了深 入的研究和檢視了一些權威的資料,現在和大家共享,希望大家在處理 oracle臨時表是注意一...