Oracle Database SQL — Question 30
Which two are true about global temporary tables? (Choose two.)
Answer options
- A. Indexes can be created on them.
- B. Backup and recovery operations are available for these tables.
- C. Their data is always stored in the default temporary tablespace of the user who created them.
- D. If the ON COMMIT clause is transaction-specific, all rows in the table are deleted after each COMMIT OR ROLLBACK.
- E. They can be created only by a user with the DBA role, but can be accessed by all users who can create a session.
- F. If the ON COMMIT clause is session-specific, the table is dropped when the session is terminated.
Correct answer: A, D
Explanation
Option A is correct because global temporary tables can indeed have indexes created on them to improve performance. Option D is also correct; when the ON COMMIT clause is set to transaction-specific, all rows in the table will be removed after a COMMIT or ROLLBACK. The other options are incorrect as they either misstate the functionality or accessibility of global temporary tables.