IBM DB2 11.1 Advanced DBA for Linux, UNIX, and Windows — Question 19
Given the following statement:
DECLARE GLOBAL TEMPORARY TABLE TEMP1 (
ID INTEGER NOT NULL,
ITEM CHAR(30),
AMOUNT DECIMAL (10,2)
ON COMMIT DELETE ROWS NOT LOGGED;
Which of the following statements are TRUE? (Choose two.)
Answer options
- A. Temp1 table is accessed under schema SESSION
- B. Temp1 definition is available for use by other sessions
- C. At the end of a transaction, data is deleted automatically
- D. Definition of the table Temp1 is stored in database catalog
- E. Rows inserted by one session are visible in other sessions
Correct answer: D, E
Explanation
The correct answers are D and E because the definition of the TEMP1 table is stored in the database catalog and can be accessed by multiple sessions. However, options A, B, and C are incorrect as the TEMP1 table is scoped to the session, its definition is not shared across sessions, and data is deleted only upon commit, not automatically at the end of a transaction.