DB2-9-Fundamentals-(C2090-730).pdf - IBM C2090-730 DB2 9 Fundamentals http\/killexams.com\/exam-detail\/C2090-730 QUESTION 141 Which of the following will

DB2-9-Fundamentals-(C2090-730).pdf - IBM C2090-730 DB2 9...

This preview shows page 1 - 4 out of 9 pages.

C2090-730 IBM DB2 9 Fundamentals
Image of page 1
QUESTION: 141 Which of the following will begin a new unit of work? A. The CONNECT statement B. The first FETCH of a cursor C. The BEGIN TRANSACTION statement D. The first executable SQL statement Answer: D QUESTION: 142 The EMPLOYEE table contains the following information: EMPNO NAME WORKDEPT --------- ------ --------------- 101 SAM A11 102 JOHN C12 103 JANE - 104 PATRemote 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 Answer: B QUESTION: 143 Given the following table definition: STOCK: itemVARCHAR(30) status CHAR(1) 53
Image of page 2
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% Answer: B QUESTION: 144 Which of the following SQL statements will return the year and average salary for allemployees hired within a given year that have a salary greater than $30,000? 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) Answer: B QUESTION: 145 CREATE TABLE customer (cid BIGINT NOT NULL PRIMARY KEY, info XML) How many names will be returned for this XQuery?
Image of page 3
Image of page 4

You've reached the end of your free preview.

Want to read all 9 pages?

  • Fall '20

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture