What is the Global Temporary table (GTT)?
As the name suggests, GTTs are temporary tables that hold data only for the lifetime of your session or transaction.
And the data in GTTs is private in the user sessions so no one can access it.
Use the below SQLs to create transaction GTTs.
create global temporary table glb_temp_tab
( ID varchar2(20),
name varchar2(60),
value int )
on commit delete rows;
Using "on commit delete rows" makes data available till the lifetime of your transaction.
Use the below SQLs to create transaction GTTs.
create global temporary table glb_temp_tab
( ID varchar2(20),
name varchar2(60),
value int )
on commit preserve rows;
if you give "on commit preserve rows" - whatever the data we commit persists until the lifetime of your session.
Comments