What would be the outcome?

You executed the following SQL statements in the given order:
CREATE TABLE orders
(order_id NUMBER(3) PRIMARY KEY,
order_date DATE,
customer_id number(3));
INSERT INTO orders VALUES (100,’10-mar-2007,,222);
ALTER TABLE orders MODIFY order_date NOT NULL;
UPDATE orders SET customer_id=333;
DELETE FROM order;
The DELETE statement results in the following error:
ERROR at line 1:
ORA-00942: table or view does not exist
What would be the outcome?

You executed the following SQL statements in the given order:
CREATE TABLE orders
(order_id NUMBER(3) PRIMARY KEY,
order_date DATE,
customer_id number(3));
INSERT INTO orders VALUES (100,’10-mar-2007,,222);
ALTER TABLE orders MODIFY order_date NOT NULL;
UPDATE orders SET customer_id=333;
DELETE FROM order;
The DELETE statement results in the following error:
ERROR at line 1:
ORA-00942: table or view does not exist
What would be the outcome?

A.
All the statements before the DELETE statement would be rolled back.

B.
All the statements before the DELETE statement would be implicitly committed within the
session.

C.
All the statements up to the ALTER TABLE statement would be committed and the outcome of
UPDATE statement would be rolled back.

D.
All the statements up to the ALTER TABLE statement would be committed and the outcome of
the UPDATE statement is retained uncommitted within the session.



Leave a Reply 2

Your email address will not be published. Required fields are marked *


Abdulali Aliyev

Abdulali Aliyev

Meybe this question has a little bit mistake.
ERROR – cause due to using reserved word(“order”) in DELETE statement and none of the answers can be true in this case.
Any idea?

Abdulali Aliyev

Abdulali Aliyev

But in any case if we ignore error the correct variant is “D”. Maybe this question is for checking how person(who will take an exam) know implicit commits with DML 🙂