IBM Assessment: DB2 9 Family Fundamentals - A2090-730 Exam Practice Test

Question 1
Which of the following causes a lock that is being held by an application using the Cursor Stability isolation level to be released?

Correct Answer: B
Question 2
Given the following statement:
SELECT hyear, AVG(salary)
FROM (SELECT YEAR(hiredate) AS hyear, salary
FROM employee WHERE salary > 30000)
GROUP BY hyear
Which of the following describes the result if this statement is executed?

Correct Answer: D
Question 3
Given the following statements:
CREATE TABLE t1 (c1 INTEGER, c2 CHAR(5));
CREATE TABLE t1audit (user VARCHAR(20), date DATE, action
VARCHAR(20));
CREATE TRIGGER trig1 AFTER INSERT ON t1
FOR EACH ROW
MODE DB2SQL
INSERT INTO t1audit VALUES (CURRENT USER, CURRENT DATE,
'Insert');
If user USER1 executes the following statements:
INSERT INTO t1 VALUES (1, 'abc');
INSERT INTO t1 (c1) VALUES (2);
UPDATE t1 SET c2 = 'ghi' WHERE c1 = 1;
How many new records will be written to the database?

Correct Answer: D
Question 4
Given the following query:
SELECT quantity,
CASE WHEN itemcode = '099' THEN 'SILVER'
WHEN itemcode = '788' THEN 'GOLD'
WHEN itemcode = '899' THEN 'PLATINUM'
ELSE 'ERROR'
END
FROM supplier
What will be the result of the query if the following data is evaluated by the CASE expression?
SUPPLIER
QUANTITY ITEMCODE 3 099 4 099 1 788 1 899 5 009 3 788 1 899

Correct Answer: B
Question 5
Which of the following best describes the lock protection provided by DB2 for the current row of a cursor?

Correct Answer: C
Question 6
Given the following two tables:
NAMES
NAME NUMBER
Wayne Gretzky 99 Jaromir Jagr 68 Bobby Orr 4 Bobby Hull 23 Brett Hull 16 Mario Lemieux 66 Mark Messier 11
POINTS
NAME POINTS
Wayne Gretzky 244 Jaromir Jagr 168 Bobby Orr 129 Brett Hull 121 Mario Lemieux 189 Joe Sakic 94
Which of the following statements will display the player name, number, and points for all players that have scored points?

Correct Answer: A
Question 7
Which of the following would NOT provide access to data stored in table TABLE1 using the name T1?

Correct Answer: A
Question 8
Which of the following SQL statements can be used to create a DB2 object to store numerical data as EURO data?

Correct Answer: A
Question 9
Which of the following is an accurate statement about packages?

Correct Answer: B
Question 10
Which of the following is NOT a characteristic of a declared temporary table?

Correct Answer: A
Question 11
If the following SQL statement is executed:
CREATE TABLE sales
(invoice_no NOT NULL PRIMARY KEY,
sales_date DATE,
sales_amt NUMERIC(7,2))
IN tbsp0, tbsp1, tbsp2, tbsp3
PARTITION BY RANGE (sales_date NULLS FIRST)
(STARTING '1/1/2007' ENDING '12/31/2007'
EVERY 3 MONTHS)
Which of the following statements is true?

Correct Answer: D
Question 12
The opening of cursor CSR01 produces the following result set:
STUDENT LASTNM FIRSTNM CLASSNO 123 Brown John T100 213 Bailey James T100 312 Carter Arlene T210 465 Chas Devon T305 546 Davis Steven T405
If this Fetch statement is executed:
FETCH csr01 INTO :studnum, :firstname, :lastname, :class
Which of the following DELETE statements will cause this row to be deleted?

Correct Answer: D
Question 13
Given the following table:
CURRENT_EMPLOYEES
EMPID INTEGER NOT NULL NAME CHAR(20) SALARY DECIMAL(10,2) PAST_EMPLOYEES
EMPID INTEGER NOT NULL
NAME CHAR(20)
SALARY DECIMAL(10,2)
Assuming both tables contain data, which of the following statements will NOT successfully add
data to table CURRENT_EMPLOYEES?

Correct Answer: B
Question 14
Which of the following actions will NOT cause a trigger to be fired?

Correct Answer: B
Question 15
Given the following two tables:
NAMES
NAME NUMBER
Wayne Gretzky 99 Jaromir Jagr 68 Bobby Orr 4 Bobby Hull 23 Mario Lemieux 66
POINTS
NAME POINTS
Wayne Gretzky 244 Bobby Orr 129 Brett Hull 121 Mario Lemieux 189 Joe Sakic 94
How many rows would be returned using the following statement?
SELECT name FROM names, points

Correct Answer: D