IBM Assessment: DB2 9 Family Fundamentals - A2090-730 Exam Practice Test
Which of the following is the lowest cost DB2 product that can be legally installed on a Linux server that has 6 CPUs?
Correct Answer: C
Vote an answer
Which of the following actions may cause a trigger to be fired?
Correct Answer: D
Vote an answer
Given the following two tables:
TAB1
COL_1 COL_2
A 10 B 12 C 14
TAB2
COL_A COL_B
A 21 C 23 D 25
Assuming the following results are desired:
COL_1 COL_2 COL_A COL_B A 10 A 21 B 12 - C 14 C 23 - - D 25
Which of the following joins will produce the desired results?
TAB1
COL_1 COL_2
A 10 B 12 C 14
TAB2
COL_A COL_B
A 21 C 23 D 25
Assuming the following results are desired:
COL_1 COL_2 COL_A COL_B A 10 A 21 B 12 - C 14 C 23 - - D 25
Which of the following joins will produce the desired results?
Correct Answer: D
Vote an answer
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
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: A
Vote an answer
Given the following tables:
CONTINENTS ID NAME COUNTRIES 1 Antarctica 0 2 Africa 53 3 Asia 47 4 Australia 14 5 Europe 43
6 North America 23 7 South America 12 REGION ID LOCATION 1 East 2 West
How many rows would be returned using the following statement?
SELECT location FROM continents, region
CONTINENTS ID NAME COUNTRIES 1 Antarctica 0 2 Africa 53 3 Asia 47 4 Australia 14 5 Europe 43
6 North America 23 7 South America 12 REGION ID LOCATION 1 East 2 West
How many rows would be returned using the following statement?
SELECT location FROM continents, region
Correct Answer: B
Vote an answer
The EMPLOYEE table contains the following information:
EMPNO NAME WORKDEPT
101 SAM A11 102 JOHN C12 103 JANE 104 PAT Remote 105 ANNE 106 BOB A11
The MANAGER table contains the following information:
MGRID NAME DEPTNO EMPCOUNT
1 WU B01 2 JONES A11 3 CHEN - 4 SMITH - 5 THOMAS C12
After this statement is executed:
UPDATE manager m SET empcount = (SELECT COUNT(workdept) FROM employee e WHERE workdept=m.deptno)
What is the result of the following query?
SELECT mgrid, empcount FROM MANAGER WHERE empcount IS NOT NULL ORDER BY mgrid
EMPNO NAME WORKDEPT
101 SAM A11 102 JOHN C12 103 JANE 104 PAT Remote 105 ANNE 106 BOB A11
The MANAGER table contains the following information:
MGRID NAME DEPTNO EMPCOUNT
1 WU B01 2 JONES A11 3 CHEN - 4 SMITH - 5 THOMAS C12
After this statement is executed:
UPDATE manager m SET empcount = (SELECT COUNT(workdept) FROM employee e WHERE workdept=m.deptno)
What is the result of the following query?
SELECT mgrid, empcount FROM MANAGER WHERE empcount IS NOT NULL ORDER BY mgrid
Correct Answer: D
Vote an answer
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?
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: C
Vote an answer
Which of the following is a typical data warehouse query?
Correct Answer: A
Vote an answer
In which of the following situations should correlation names be used?
Correct Answer: D
Vote an answer
Which of the following will allow user USER1 to change the comment associated with a table named TABLE1?
Correct Answer: D
Vote an answer
Which of the following is a feature of a unit of work?
Correct Answer: C
Vote an answer
Given the following data:
TAB1
C1 C2
200 abc 250 abc 150 def 300 ghi 175 def
If the following query is executed:
WITH subset (col1, col2) AS (SELECT c1, c2 FROM tab1 WHERE c1 > 150) SELECT col2, SUM(col1) AS col1_sum FROM subset GROUP BY col2 ORDER BY col2
Which of the following result data sets will be produced?
TAB1
C1 C2
200 abc 250 abc 150 def 300 ghi 175 def
If the following query is executed:
WITH subset (col1, col2) AS (SELECT c1, c2 FROM tab1 WHERE c1 > 150) SELECT col2, SUM(col1) AS col1_sum FROM subset GROUP BY col2 ORDER BY col2
Which of the following result data sets will be produced?
Correct Answer: C
Vote an answer
If the following SQL statements are executed:
CREATE TABLE tab1 (id SMALLINT NOT NULL PRIMARY KEY,
name VARCHAR(25));
CREATE TABLE tab2 (empid SMALLINT,
weekno SMALLINT,
payamt DECIMAL(6,2),
CONSTRAINT const1 FOREIGN KEY (empid)
REFERENCES taba(id) ON UPDATE NO ACTION);
Which of the following statements is true?
CREATE TABLE tab1 (id SMALLINT NOT NULL PRIMARY KEY,
name VARCHAR(25));
CREATE TABLE tab2 (empid SMALLINT,
weekno SMALLINT,
payamt DECIMAL(6,2),
CONSTRAINT const1 FOREIGN KEY (empid)
REFERENCES taba(id) ON UPDATE NO ACTION);
Which of the following statements is true?
Correct Answer: A
Vote an answer
Which of the following is NOT a valid method of authentication that can be used by DB2 9?
Correct Answer: A
Vote an answer