Global Temporary Table (GTT) in Oracle PL SQL Interview Questions And Answers For Experience & Freshers | Interview Preparation
GTT stores temporary data. Here table is not temporary. Data is temporary. Data exists till session/transaction exist.
At the end of the session/transaction data is deleted.
GTT have two types:
1) Session Specific GTT -
Data is session specific in this GTT. One session data is not visible in another session. In this we are using on commit preserve rows clause.
2)Transaction Specific GTT -
Data is available until committing the transaction.
In this GTT we are using on commit delete rows clause.
Usage of GTT :
1) GTT are helpful in removing complex subqueries.
2) Improves performance of the complicated tasks.
3) GTT have all features that ordinary tables have like indexes, views, triggers, explain plans.
Disadvantages :
GTT can't have foreign keys related to other temporary/permanent tables.
Please do check our daily posts, videos for beneficial informations, in case of any additional queries please do contact us, we are happy to assist you.
https://www.youtube.com/a4uofficial
0 Comments