単一のOracleセッションで実行されるこれらのステートメントを調べます。 CREATE TABLE製品(pcode NUMBER(2)、pname VARCHAR2(20)); INSERT INTO product VALUES(1、 'pen'); INSERT INTO product VALUES(2、 'pencil'); INSERT INTO product VALUES(3、 '万年筆'); セーブポイントa; UPDATE製品SETpcode = 10 WHERE pcode = 1; コミット; DELETE FROM product WHERE pcode = 2; セーブポイントb; UPDATE製品SETpcode = 30 WHERE pcode = 3; セーブポイントc; DELETE FROM product WHERE pcode = 10; セーブポイントへのロールバックb; コミット; 正しい3つのステートメントはどれですか?
正解:A,C,F
* After creation and initial inserts, the pcode for 'pen' is updated to 10, and then committed. * The 'pencil' row is deleted and not yet committed. * A savepoint b is set after the deletion of the 'pencil' row. * The 'fountain pen' pcode is updated to 30, followed by setting savepoint c. * The 'pen' row (now with pcode 10) is deleted. * A rollback to savepoint b reverts the deletion of 'pen' and the update to 'fountain pen', but not the deletion of 'pencil', which was committed earlier due to the scope of the savepoint. * Therefore, after the final commit: * A: The code for 'pen' is 10, since the update was committed and the subsequent delete was rolled back. * C: There is no row containing 'pencil' because its deletion was committed. * F: There is a row containing 'pen' because the deletion was rolled back to savepoint b which was set after the deletion of 'pencil'.