rowid
Global temporary tables have
rowids which is demonstrated below.
WE need a GTT with some data…
create global temporary table tq84_gtt (
num number,
txt varchar2(10)
);
begin
insert into tq84_gtt values (1, 'one' );
insert into tq84_gtt values (2, 'two' );
insert into tq84_gtt values (3, 'three');
insert into tq84_gtt values (4, 'four' );
end;
/
The data is updated…
begin
for r in (select rowid, txt from tq84_gtt) loop
update tq84_gtt set txt = upper(r.txt) where rowid = r.rowid;
end loop;
end;
/
Show the updated values:
select * from tq84_gtt;
NUM TXT
---------- ----------
1 ONE
2 TWO
3 THREE
4 FOUR
Cleaning up:
drop table tq84_gtt purge;