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%
您可能感兴趣的试卷
你可能感兴趣的试题
The EMPLOYEE table contains the following information: EMPNO NAME WORKDEPT
101 SAM A11 102 JOHN C12 103 JANE -104 PAT Remote
105 ANNE -106 BOB A11
The MANAGER table contains the following information: MGRID NAME DEPTNO EMPCOUNT
1 WU B01 - 2 JONES A11 - 3 CHEN - - 4 SMITH - -5 THOMAS C12 -
After this statement is executed: UPDATE manager m SET empcount = (SELECT COUNT(workdept) FROM employee e WHERE workdept=m.deptno)
What is the result of the following query?()
SELECT mgrid, empcount FROM MANAGER WHERE empcount IS NOT NULL ORDER BY mgrid
A. MGRID EMPCOUNT ----- -------- 1 0 2 2 5 1
B. MGRID EMPCOUNT ----- -------- 1 0 2 2 3 0 4 0 5 1
C. MGRID EMPCOUNT ----- -------- 1 3 2 3 3 3 4 3 5 3
D. MGRID EMPCOUNT ----- -------- 1 0 2 2 3 2 4 2 5 1
A.The CONNECT statement
B.The first FETCH of a cursor
C.The BEGIN TRANSACTION statement
D.The first executable SQL statement
Given that tables T1 and T2 contain the following rows:
Table T1: C1 C2 1 4 1 3 1 2
Table T2: C1 C2 1 1 1 2 1 3
Which of the following queries will return only those rows that exist in both T1 and T2?()
A.SELECT * FROM t1 UNION SELECT * FROM t2
B.SELECT * FROM t1 UNION DISTINCT SELECT * FROM t2
C.SELECT * FROM t1 INTERSECT SELECT * FROM t2
D.SELECT * FROM t1 WHERE (c1,c2)= (SELECT c1,c2 FROM t2)
A.Row
B.Table
C.Scalar
D.Column
A.CALL increase_salary('A00')
B.VALUES increase_salary('A00')
C.CALL increase_salary('A00', ?)
D.VALUES increase_salary('A00', ?)
The opening of cursor CSR01 produces the following result set:
STUDENT LASTNM FIRSTNM CLASSNO 123 Brown John T100 213 Bailey James
T100 312 Carter Arlene T210 465 Chas Devon T305 546 Davis Steven T405
If this Fetch statement is executed: FETCH csr01 INTO :studnum, :firstname, :lastname, :class Which of the following DELETE statements will cause this row to be deleted?()
A.DELETE ALL FROM tab01 FOR CURRENT OF csr01
B.DELETE FROM tab01 FOR CURRENT csr01 WITH RS
C.DELETE * FROM tab01 WHERE CURRENT csr01 WITH CS
D.DELETE FROM tab01 WHERE CURRENT OF csr01 WITH RR
A.REVOKE SELECT FROM user2 ON TABLE org.tab1
B.REVOKE SELECT ON TABLE org.tab1 FROM user2
C.REVOKE READ ACCESS FROM user2 ON TABLE org.tab1
D.REVOKE READ ACCESS ON TABLE org.tab1 FROM user2
A.Sequence
B.Schema
C.Group
D.View
A.User ID/password file
B.Communications layer
C.Client applications
D.Operating system
A.GRANT ADD DATA ON TABLE tab1 TO GROUP tom appgrp
B.GRANT INSERT TO USER tom, GROUP appgrp ON TABLE tab1
C.GRANT INSERT ON TABLE tab1 TO USER tom, GROUP appgrp
D.GRANT ADD DATA ON TABLE tab1 TO USER appgrp, GROUP tom
最新试题
Which of the following scenarios will ensure that the value of the NEXT_STEPNO column in a given row of table TABLEX exists as a value of column STEPNO (usually in another row) in the same table?()
A table was created using the following DDL:CREATE TABLE employee (id SMALLINT NOT NULL, name VARCHAR(9), dept SMALLINT CHECK (dept BETWEEN 10 AND 100),job CHAR(10) CHECK (job IN ('Sales','Mgr','Clerk')), hiredate DATE, salary DECIMAL(7,2), comm DECIMAL(7,2), PRIMARY KEY (id), CONSTRAINT yearsal CHECK (YEAR(hiredate) > 2004 OR salary > 80500) );Which of the following INSERT statements will fail?()
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?()
Which of the following statements is used to grant user TOM and Application team APPGRP the ability to add data to table TAB1?()
Which of the following will begin a new unit of work?()
Given the following two tables:TAB1 R1A A A B B C C D E TAB2 R2A A B B C C DWhich of the following queries returns the following result set? RETVAL E()
Given the following requirements:Create a table to contain employee data, with a unique numeric identifier automatically assigned when a row is added, has an EDLEVEL column that permits only the values 'C', 'H' and 'N', and permits inserts only when a corresponding value for the employee's department exists in the DEPARTMENT table.Which of the following CREATE statements will successfully create this table?()
Which of the following describes the objects of a DB2 database and their relationships?()
An application needs to store a 5 MB JPEG image in a DB2 table. Which data type should be specified for the column that will be used for storing the image?()
Which of the following database objects can be used to raise an error if a table is updated?()