top of page
Search

How to create a Global Temporary Table(GTT) in Oracle Database 19c

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.

49 views0 comments

Recent Posts

See All

Comments


Contact Me

Tel: 7989359581

Lakshminarayana0071@gmail.com

  • Facebook Social Icon
  • LinkedIn Social Icon
  • Twitter Social Icon

Thanks for submitting!

© 2023 by Phil Steer . Proudly created with Wix.com

bottom of page