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, SET quantity = 0, SET 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; quantity, price = 0) WHERE item LIKE S%
D. UPDATE stock SET (status = NULL), (quantity = 0), (price = 0) WHERE item LIKE S%
正解:B
質問 2:
Assuming PUBLIC has been granted all privileges on table T1, which of the following statements would continue to permit any user to add rows to table T1, but not remove them?
A. REVOKE CONTROL ON t1 FROM PUBLIC
B. REVOKE UPDATE ON t1 FROM PUBLIC
C. REVOKE DROP ON t1 FROM PUBLIC
D. REVOKE DELETE ON t1 FROM PUBLIC
正解:D
質問 3:
Application A issues the following SQL statements within in a single transaction using the
Uncommitted Read isolation level:
SELECT * FROM employee WHERE deptno='A00';
UPDATE employee SET salary = salary * 1.1 WHERE deptno='A00';
As long as the transaction has not been committed, which of the following is true for all other
applications not running under the Uncommitted Read isolation level?
A. They must wait until application A disconnects before accessing data of any employee in department A00.
B. They can read and make changes to data for any employee in department A00.
C. They must wait until the transaction is committed before accessing data of any employee in department A00.
D. They can read but not make changes to data for any employee in department A00.
正解:C
質問 4:
Which type of key is defined on the child table to implement a referential constraint?
A. Foreign key
B. Composite key
C. Primary key
D. Unique key
正解:A
質問 5:
Which of the following is a valid wildcard character in a LIKE clause of a SELECT statement?
A. \
B. %
C. ?
D. *
正解:B