IBM Assessment: DB2 9.7 Application Development - A2090-543 Exam Practice Test
Which three are required for a global transaction? (Choose three.)
Correct Answer: A,B,C
Given the two tables shown below: TAB1 LETTER GRADE A 80 B 70 C 60 TAB2 LETTER GPA A 4 C 2 D 1 and the successful execution of the following query: SELECT * FROM tab1 FULL OUTER JOIN tab2 ON tab1.letter = tab2.letter; How many rows will be returned?
Correct Answer: A
Using the default lock timeout and isolation level, user USER1 drops table TABLE1 however, the transaction is not committed. Subsequently, user USER2 attempts to access table TABLE1 using the default isolation level. What will occur?
Correct Answer: A
Given the two tables shown below: TAB1 LETTER GRADE A 80 B 70 C 60 TAB2 LETTER GPA A 4 C 2 D 1 and the successful execution of the following query: SELECT * FROM tab1 RIGHT OUTER JOIN tab2 ON tab1.letter = tab2.letter; How many rows will be returned?
Correct Answer: D
A CLI/ODBC application uses the SQL FetchScroll() API to retrieve an updatable row set with five rows of data. Each column of the row set is bound to an array of application memory. The API is called with the SQL_FETCH_NEXT FetchOrientationoption and returns SQL_SUCCESS_WITH_INFO. Diagnostics show a truncation SQLSTATE of "01004".
Which API call correctly identifies the record with the failure?
Which API call correctly identifies the record with the failure?
Correct Answer: B
A table and a sequence were created with the statements shown below: CREATE TABLE orders(oid INTEGER, info VARCHAR(200));
CREATE SEQUENCE order_num AS INTEGER
START WITH 1;
Autocommitis on and the statements shown are executed:
INSERT INTO orders VALUES (NEXT VALUE FOR order_num, 'Order A');
INSERT INTO orders VALUES (PREVIOUS VALUE FOR order_num, 'Order B');
SELECT * FROM orders;
What is the output?
CREATE SEQUENCE order_num AS INTEGER
START WITH 1;
Autocommitis on and the statements shown are executed:
INSERT INTO orders VALUES (NEXT VALUE FOR order_num, 'Order A');
INSERT INTO orders VALUES (PREVIOUS VALUE FOR order_num, 'Order B');
SELECT * FROM orders;
What is the output?
Correct Answer: D
Click the Exhibit button. PRODUCTS ID NAME QUANTITY
1 Orange juice 30
2 Milk 25 Given the table shown in the exhibit.
Which values will be returned by query shown below?
SELECT XMLGROUP(
id as "Id",name as "Name",quantity as "Quantity"
OPTION ROW "Product") as Products
FROM products
1 Orange juice 30
2 Milk 25 Given the table shown in the exhibit.
Which values will be returned by query shown below?
SELECT XMLGROUP(
id as "Id",name as "Name",quantity as "Quantity"
OPTION ROW "Product") as Products
FROM products
Correct Answer: B
A library keeps digital copies of books in the table shown below:
CREATE TABLE library.collection (
bookidINTEGER NOT NULL PRIMARY KEY,
ebook_contentBLOB(2G) )
A CLI/ODBC application is written that retrieves the EBOOK_CONTENT for a given BOOKID in
32K pieces.
Which two APIs can be used to perform the retrieval? (Choose two.)
CREATE TABLE library.collection (
bookidINTEGER NOT NULL PRIMARY KEY,
ebook_contentBLOB(2G) )
A CLI/ODBC application is written that retrieves the EBOOK_CONTENT for a given BOOKID in
32K pieces.
Which two APIs can be used to perform the retrieval? (Choose two.)
Correct Answer: B,C
Which steps are necessary to issue a batch update using a single SQL statement? (Note: The statement has several sets of input parameter markers and is issued from a database application using the IBM Data Server Driver for JDBC.)
Correct Answer: B
Click the Exhibit button.
CONNECT TO test;
CREATE TABLE colors (id INT NOT NULL PRIMARY KEY,
descVARCHAR(12));
CREATE TABLE objects(desc VARCHAR(12),
c_idINT REFERENCES colors (id)
ON UPDATE NO ACTION);
INSERT INTO colors VALUES (1, 'Red'), (2, 'Yellow'), (3, 'Blue');
INSERT INTO objects VALUES ('Fire Engine', 1), ('Rain Coat', 2);
CONNECT RESET;
A DB2 Command Line Processor script file containing the commands and statements shown in
the exhibit was executed successfully.
The statement shown below is executed:
UPDATE colors SET id = id - 1;
How many rows will be modified in the COLORS table?
CONNECT TO test;
CREATE TABLE colors (id INT NOT NULL PRIMARY KEY,
descVARCHAR(12));
CREATE TABLE objects(desc VARCHAR(12),
c_idINT REFERENCES colors (id)
ON UPDATE NO ACTION);
INSERT INTO colors VALUES (1, 'Red'), (2, 'Yellow'), (3, 'Blue');
INSERT INTO objects VALUES ('Fire Engine', 1), ('Rain Coat', 2);
CONNECT RESET;
A DB2 Command Line Processor script file containing the commands and statements shown in
the exhibit was executed successfully.
The statement shown below is executed:
UPDATE colors SET id = id - 1;
How many rows will be modified in the COLORS table?
Correct Answer: D