Consider the following code:
CREATE OR REPLACE PROCEDURE log_transaction(log_message VARCHAR2, log_level NUMBER) AS PRAGMA AUTONOMOUS_TRANSACTION; BEGIN INSERT INTO logs(log_text, log_level) VALUES(log_message, log_level); IF log_level = 0 THEN ROLLBACK WORK; ELSIF log_level <= 5 THEN COMMIT; END IF; END; /
Select the statements that are correct when calling this function within another transaction.
(Select all acceptable answers.)
The procedure defines a savepoint named AUTONOMOUS_TRANSACTION.
The procedure can be called within another transaction without affecting the main transaction.
If log_level is 0, the transaction will be rolled back to the WORK savepoint.
If log_level is greater than 5, then an exception will be raised when the procedure exits.
The COMMIT statement will commit all active transactions.