oracl 中兩種臨時表的建立

oracl 中能夠建立兩種臨時表: session

1.事物級別的臨時表: it

create global temporary table admin_test_tb io

(starttime DATE, table

endtime DATE, class

class VARCHAR(20)) test

on commit delete rows; im

注:事物級別的臨時表在,只在一個事物中有效,當該事物結束後,後自動清除全部記錄。 數據

2.會話級別的臨時表: tab

create global temporary table admin_test_tb co

(starttime DATE,

endtime DATE,

class VARCHAR(20))

on commit preserve rows;

注:會話級別的臨時表,全部數據存當前的session中 當會話結束時 一樣會自動刪除表中的全部數據。

相關文章
相關標籤/搜索