176.You executed this command to create a temporary table:
SQL> CREATE GLOBAL TEMPORARY TABLE report_work_area (
startdate DATE,
enddate DATE,
class CHAR(20)
) ON COMMIT PRESERVE ROWS;
Which statement is true about the rows inserted into the REPORT_WORK_AREA table during a
transaction?
A.The rows stay in the table only until session termination.
B.The rows stay in the table only until the next transaction starts on the table.
C.The rows are visible to all current sessions after the transaction is committed.
D.The rows stay available for subsequent sessions after the transaction is committed.
答案:A
解析:这里考察的是临时表
on commit [preserve|delete] rows
指明临时表中行的有效期,
delete 说明这些行在事务的末尾要被删除,
preserve 说明这些行在用户会话的末尾被删除
如果没有指定on commit 那么默认为 delete
SQL> CREATE GLOBAL TEMPORARY TABLE report_work_area (
startdate DATE,
enddate DATE,
class CHAR(20)
) ON COMMIT PRESERVE ROWS;
Which statement is true about the rows inserted into the REPORT_WORK_AREA table during a
transaction?
A.The rows stay in the table only until session termination.
B.The rows stay in the table only until the next transaction starts on the table.
C.The rows are visible to all current sessions after the transaction is committed.
D.The rows stay available for subsequent sessions after the transaction is committed.
答案:A
解析:这里考察的是临时表
on commit [preserve|delete] rows
指明临时表中行的有效期,
delete 说明这些行在事务的末尾要被删除,
preserve 说明这些行在用户会话的末尾被删除
如果没有指定on commit 那么默认为 delete