Skip to Main Content
  • Questions
  • Understanding purpose of undo for Global Temporary Tables DML operation

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, SanthoshKumar.

Asked: June 20, 2020 - 5:48 am UTC

Answered by: Connor McDonald - Last updated: July 01, 2020 - 1:58 am UTC

Category: Database Administration - Version: 11.2

Viewed 100+ times

You Asked

Hi TOM,
I know Global Temporary Table (GTT) will generate undo data while any DML operations performed on it within that session before commit. But I want to understand why undo is needed for DML operations on GTT. Is that to support following kind of time based queries within that session?

SELECT * FROM GTT_TAB1 AS OF TIMESTAMP TO_TIMESTAMP('2005-04-04 09:30:00', 'YYYY-MM-DD HH:MI:SS');

and we said...

Far simpler than that....We need to allow this:

insert into GTT values (1);
rollback;                                  <<=====


For that...you need undo.


and you rated our response

  (1 rating)

Reviews

Thank You!

June 30, 2020 - 4:47 am UTC

Reviewer: Santhosh from India

Thanks You! for reviewing it. I understood it better now.
Connor McDonald

Followup  

July 01, 2020 - 1:58 am UTC

glad we could help

More to Explore

PL/SQL

Check out more PL/SQL tutorials on our LiveSQL tool.