View the Exhibit and examine the structure of the ORDERS table.
Which UPDATE statement is valid?
A.
UPDATE orders
SET order_date = ’12-mar-2007′,
order_total IS NULL
WHERE order_id = 2455;
B.
UPDATE orders
SET order_date = ’12-mar-2007′,
order_total = NULL
WHERE order_id = 2455;
C.
UPDATE orders
SET order_date = ’12-mar-2007′
AND order_total = TO_NUMBER(NULL)
WHERE order_id = 2455;
D.
UPDATE orders
SET order_date = TO_DATE(’12-mar-2007′,’dd-mon-yyyy’), SET order_total = TO_NUMBER(NULL)
WHERE order_id = 2455;
UPDATE ord1
SET order_date = TO_DATE(’12-mar-2007′,’dd-mon-yyyy’),
order_total = TO_NUMBER(NULL);
UPDATE ord1
SET order_date = ’12-17-2007′,
order_total = (NULL);
update enp set sal = null where empno = 1;
update enp set sal = TO_NUMBER(NULL) where empno = 2;
Is B correct? Should it be “order_total IS NULL” instead of “order_total = NULL”?
B is the Correct Answer. So is the Format for Update
UPDATE table
SET column1 = expression1,
column2 = expression2,
…
[WHERE conditions];