Friday 12 July 2013

What is Global temporary table? And what are the benefits of it?

Global temporary table is kind of temporary table managed by system. It'll keep in temporary tablespace till the sessions remain. There are two methods available i.e.

1) create global temporary table t1 on commit delete rows.
With this option table t1 data will be lost whenever commit will be issued by user.

2) create global temporary table t1 on commit preserve rows.
With this option table t1 data will be lost whenever session is lost.

After deletion we do not need to give any storage management command because global temporary tables are system managed and after deletion of data space which was occupied by table are ready to allocate for other use.

No comments:

Post a Comment