临时表分为:事务临时表delete(commit后就没数据)
会话临时表PRESERVE(断开session后没数据)
事务:
CREATE GLOBAL TEMPORARY TABLE t_g_tmp_test(tid number,tname varchar2(20)) ON COMMIT delete ROWS;
insert into t_g_tmp_test values(1,'sss');
commit;
select * from t_g_tmp_test t;
会话
CREATE GLOBAL TEMPORARY TABLE t_g_tmp_test_sess(tid number,tname varchar2(20)) ON COMMIT PRESERVE ROWS;
insert into t_g_tmp_test_sess values(1,'sss');
commit;
select * from t_g_tmp_test_sess t;
大对象
create table clob_table(id number primary key,clob_col clob not null);
create table blob_table(id number primary key,blob_col blob not null);
insert into clob_table values(1,to_clob('赵炳南clob'));
update clob_table t set t.clob_col = to_clob('new——date');
insert into blob_table values(2,to_blob('11111010'));
update blob_table t set t.blob_col = to_blob('00001111');
commit;
declare
v_clob clob := '此处省略10000字';
begin
insert into clob_table values (2, v_clob);
end;
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/12961536/viewspace-769560/
,如需转载,请注明出处,否则将追究法律责任。