IBM DB2 9.7 Application Development - C2090-543 FREE EXAM DUMPS QUESTIONS & ANSWERS

While developing a Java JDBC application, you use the set of statements shown below:
Connection con;
PreparedStatementpstmt;
intnumUpd;
pstmt= con.prepareStatement("UPDATE EMPLOYEE SET PHONENO='4657' WHERE
EMPNO=?");
pstmt.setString(0, "000010");
numUpd= pstmt.executeUpdate();
pstmt.close();
Assuming a connection has already been established, which statement is true?
Correct Answer: D Vote an answer
A stored procedure is invoked that can return multiple result sets.
After processing the first result set, which CLI/ODBC API can be used to determine if another
result set exists?
Correct Answer: A Vote an answer
.Click the Exhibit button.
<personinfo>
<name>John Wayne</name>
<address type="private">
<city>New York</city>
<country>US</country>
<phone>850-734-6672</phone>
</address>
<phone type="mobile">796-858-1272 </phone>
<phone type="security">646-252-1053</phone>
</personinfo>
<personinfo>
<name>Barbara Wayne</name>
<address type="private">
<city>New York</city>
<country>US</country>
<phone>850-734-6672</phone>
</address>
<phone type="mobile">796-858-1231 </phone>
<phone type="security">646-252-1153</phone>
</personinfo>
The table PERSON is declared as shown below:
CREATE TABLE person (id BIGINT, info XML)
The documents shown in the exhibit are successfully inserted into the table.
How many phone numbers will be affected by the statement shown below?
UPDATE xmlapp.person
SET info = xmlquery( 'copy $new := $INFO
modify for $j in $new/personinfo//phone return
do replace value of $j with "444-444-4444"
return $new' )
WHERE XMLEXISTS('$INFO/personinfo[name="John Wayne"]')
Correct Answer: B Vote an answer
Given the application shown below:
DECLARE csr1 CURSOR WITH HOLD FOR SELECT * FROM employee;
OPEN csr1;
FETCH csr1;
COMMIT;
CLOSE csr1;
How long does cursor CSR1 remain open?
Correct Answer: C Vote an answer
A PHP script calls a stored procedure that returns more than one result set.
After the rows from the first result set are fetched, which function should be used to retrieve the
subsequent result sets?
Correct Answer: A Vote an answer
Click the Exhibit button.
CREATE TABLE store(sid INTEGER, info XML);
INSERT INTO store VALUES (1,
'<storeinfo sid="1">
<name>ABCDEF</name>
</storeinfo>');
INSERT INTO store VALUES (2,
'<storeinfo sid="2">
<name>FEDCBA</name>
</storeinfo>');
Given the statements shown in the exhibit, a user executes the query shown below:
XQUERY for $store in db2-fn:xmlcolumn('STORE.INFO')/storeinfo
let $name := fn:substring($store/name, 1, 3),
$lcase := fn:lower-case($name)
return $lcase
What is the output?
Correct Answer: C Vote an answer
.In a PHP script, which ibm_db2 functions should be used if the user wants to retrieve a row in a result set as an array, indexed by column name?
Correct Answer: A Vote an answer
Click the Exhibit button.
CONNECT TO test;
CREATE TABLE tab_a (col1 INT);
CREATE TABLE tab_b (col1 INT);
INSERT INTO tab_a VALUES (1), (2), (3), (4);
INSERT INTO tab_b VALUES (1), (2), (2), (3);
CONNECT RESET;
A DB2 Command Line Processor script file containing the commands and statements shown in
the exhibit executed successfully.
If the statement shown below is executed:
DELETE FROM tab_a WHERE col1 IN (SELECT DISTINCT * FROM tab_b);
How many rows will be removed from table TAB_A?
Correct Answer: A Vote an answer
The table shown below exists in the database:
CREATE TABLE team.workitems ( priority INTEGER, last_update TIMESTAMP, details XML )
User USER1 has CREATEIN authority on the TEAM schema and can SELECT from the
TEAM.WORKITEMS table. An SQL routine is created that performs a positioned update using a
cursor declared as shown below:
DECLARE c_workitem CURSOR FOR SELECT priority, last_update FROM team.workitems FOR
UPDATE;
Which additional privilege is required?
Correct Answer: C Vote an answer
A company has a requirement that will update data on multiple databases. The data currently
resides on databases that are part of the DB2 family of products.
What would be two minimum configurations needed to facilitate the correct update on all database
servers without loss of data integrity? (Choose two.)
Correct Answer: B,D Vote an answer
0
0
0
10