PrepAway - Latest Free Exam Questions & Answers

Category: C2090-730

Exam C2090-730: DB2 9 Family Fundamentals

Which of the following records would be returned by the following statement?

Given the following set of statements:
CREATE TABLE tab1 (col1 INTEGER, col2 CHAR(20));
COMMIT;
INSERT INTO tab1 VALUES (123, ‘Red’);
INSERT INTO tab1 VALUES (456, ‘Yellow’);
SAVEPOINT s1 ON ROLLBACK RETAIN CURSORS;
DELETE FROM tab1 WHERE col1 = 123;
INSERT INTO tab1 VALUES (789, ‘Blue’);
ROLLBACK TO SAVEPOINT s1;
INSERT INTO tab1 VALUES (789, ‘Green’);

UPDATE tab1 SET col2 = NULL WHERE col1 = 789;
COMMIT;
Which of the following records would be returned by the following statement?
SELECT * FROM tab1

Which two of the following SQL statements illustrate the proper way to invoke the scalar function DEGF_TO_C?

Given the following table:
TEMP_DATA
TEMP DATE
—– —–
45 12/25/2006
51 12/26/2006
67 12/27/2006
72 12/28/2006
34 12/29/2006
42 12/30/2006
And the following SQL statement:
CREATE FUNCTION degf_to_c (temp INTEGER)
RETURNS INTEGER
LANGUAGE SQL
CONTAINS SQL
NO EXTERNAL ACTION
DETERMINISTIC
BEGIN ATOMIC
DECLARE newtemp INTEGER;
SET newtemp = temp – 32;
SET newtemp = newtemp * 5;
RETURN newtemp / 9;
END
Which two of the following SQL statements illustrate the proper way to invoke the scalar function
DEGF_TO_C?

What is the result of the following XQuery expression?

Given the following CREATE TABLE statement:
CREATE TABLE customer(custid INTEGER, info XML)
And the following INSERT statements:
INSERT INTO customer VALUES (1000,
‘<customerinfo xmlns=”http://custrecord.dat” custid=”1000″>
<name>John Doe</name>
<addr country=”United States”>
<street>25 East Creek Drive</street>
<city>Raleigh</city>
<state-prov>North Carolina</state-prov>
<zip-pcode>27603</zip-pcode>
</addr>
<phone type=”work”>919-555-1212</phone>
<email>john.doe@abc.com</email>
</customerinfo>’);
INSERT INTO customer VALUES (1000,
‘<customerinfo xmlns=”http://custrecord.dat” custid=”1001″>
<name>Paul Smith</name>
<addr country=”Canada”>
<street>412 Stewart Drive</street>
<city>Toronto</city>
<state-prov>Ontario</state-prov>
<zip-pcode>M8X-3T6</zip-pcode>
</addr>
<phone type=”work”>919-555-4444</phone>
<email>psmith@xyz.com</email>
</customerinfo>’);
What is the result of the following XQuery expression?
XQUERY declare default element namespace “http://custrecord.dat”; for
$info in db2-fn:xmlcolumn(‘CUSTOMER.INFO’)/customerinfo where
$info/addr/state-prov=”Ontario” return $info/name/text();


Page 18 of 29« First...10...1617181920...Last »