IBM Assessment: DB2 9.7 Application Development - A2090-543 Exam Practice Test

You have created a stored procedure (MULTIRESULTS()) on the server which will return multiple
result sets. Whiledeveloping a PHP application using the IBM_DB2 extension, you want to call the
stored procedure. The code shown below will execute the stored procedure:
$stmt = db2_exec($conn, 'CALL multiResults()');
How can you fetch all of the result sets from $stmt?
Correct Answer: D
Which object can be invoked on a single invocation to return both output parameters and a result set back to the invoking application?
Correct Answer: D
The table shown below exists within a database:
CREATE TABLE s1.t1 ( c1 INTEGER NOT NULL PRIMARY KEY, c2 CLOB( 2G ) )
A CLI/ODBC application uses the SQLGetSubString() API to retrieve the first 1024 and last 1024
bytes of data from column C2.
Which mechanism is used to minimize the amount of data sent to the client for this operation?
Correct Answer: A
While developing a Java JDBC application, you use the set of statements shown below:
Connection con;
Statement stmt;
intnumUpd;
stmt = con.createStatement();
numUpd= stmt.executeUpdate("UPDATE EMPLOYEE SET PHONENO='4657' WHERE
EMPNO=?");
stmt.close();
con.close();
Assuming a connection has already been established, which statement is true?
Correct Answer: B
In a query, which clause can reference a CLOB data type?
Correct Answer: A
Which object can be created to group together related procedures and user-defined functions that are used for tax calculations?.
Correct Answer: C
.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: D
.You have set your data types as CHAR(10), VARCHAR(20). Given the operation shown below: CHAR(10) UNION VARCHAR(20)What will be the final data type?
Correct Answer: C
Click the Exhibit button.
CREATE TABLE prod_type (prod_type VARCHAR(10), description VARCHAR (30));
CREATE TABLE prod_descr(info XML);
INSERT INTO prod_descr VALUES
('<product id="1">
<name>Orange juice</name>
<company>Orange Garden</company>
<type>Drinks</type>
</product>'),
('<product id="2">
<name>Coke</name>
<company>Best drinks</company>
<type>Drinks</type>
<type>Premium</type>
</product>');
INSERT INTO prod_type VALUES ('Drinks','Drinks');
You execute the SQL statement shown in the exhibit.
Which two statements will return rows? (Choose two.)
Correct Answer: B,D
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), (1), (2), (2);
CONNECT RESET;
A DB2 Command Line Processor script file containing the commands and statements shown in
the exhibit was executed successfully.
If the statement shown below is executed:
UPDATE tab_a SET col1 = 10 WHERE col1 IN (SELECT * FROM tab_b);
How many rows in table TAB_A will be modified?
Correct Answer: B