Given the following table definition:
STOCK:
item VARCHAR(30)
status CHAR(1)
quantity INT
price DEC(7,2)
If items are indicated to be out of stock by setting STATUS to NULL and QUANTITY and PRICE to
zero, which of the following statements would be used to update the STOCK table to indicate that
all the items whose description begins with the letter “S” are out of stock?
A.
UPDATE stock SET (status = NULL; quantity, price = 0) WHERE item LIKE S%
B.
UPDATE stock SET (status, quantity,price) = (NULL, 0, 0) WHERE item LIKE S%
C.
UPDATE stock SET status = NULL, SET quantity = 0, SET price = 0 WHERE item LIKE ‘S%’
D.
UPDATE stock SET (status = NULL), (quantity = 0), (price = 0) WHERE item LIKE S%
UPDATE EMPLOYEE
SET WORKDEPT = ‘D11’,
PHONENO = ‘7213’,
JOB = ‘DESIGNER’
WHERE EMPNO = ‘000270’
You can also write the UPDATE statement by specifying all of the columns and then all of the values:
UPDATE EMPLOYEE
SET (WORKDEPT, PHONENO, JOB)
= (‘D11’, ‘7213’, ‘DESIGNER’)
WHERE EMPNO = ‘000270’
0
0