8/14/2019 Db2cert4v8 Sample
1/4
DB2 UDB V8.1 Family Fundamentals
Working with DB2 UDB Data: Sample Questions
1) To store the price of items with a maximum price of 99999.99, which data type doyou use?
a. numeric(5,2)b. doublec. decimal(7,2)d. money
2) Which two of the following data types can be used to store double byte data?a. graphicb. varcharc. BLOBd. DBCLOB
3) Given the following tables:Table1 Table2
1 3
2 45
How many rows will be returned if the following statement is executed?
SELECT * FROM Table1, Table2
a. 0b. 3c. 5d. 6
4) Using Table1 from question 3, which SELECT statement will return a result setwith no duplicates?
a.SELECT DISTINCT * FROM Table1b.SELECT UNIQUE * FROM Table1c.
SELECT DISTINCT (*) FROM Table1d.SELECT UNIQUE (*) FROM Table1
Working with DB2 UDB Data: Sample Questions 1
8/14/2019 Db2cert4v8 Sample
2/4
DB2 UDB V8.1 Family Fundamentals
5) For the following SELECT statement:SELECT * FROM employee
What is true about the order of the result set?a. ascending orderb. descending orderc. no orderd. order data was entered
6) Which operator is used to retrieve the set of values which exist in the first table,but not the second in a query?
a. Left Outer Joinb. Exceptc. Onlyd.
Where
7) Given the following table:grades
name class grade
bob math 99
ann math 95
tom chem 85
bob chem 99
Which statement will change bobs grade in math from 99 to 85?a.UPDATE grades SET grade=85 WHERE grade=99b.UPDATE TABLE grades SET grade=85 WHERE name=bob ANDclass=mathc.UPDATE grades SET grade=85 WHERE name=bob AND
class=math
d.UPDATE grades SET grade=85 WHERE name=bob8) Given the following statements:
CREATE TABLE table1 (col1 INTEGER, check (col1 > 100))
CREATE VIEW view1 AS
SELECT col1 FROM table1
WHERE col1 > 150
Which of the following INSERT statement will fail?a.INSERT INTO view1 VALUES (150)b.INSERT INTO view1 VALUES (125)c.INSERT INTO view1 VALUES (200)d.INSERT INTO view1 VALUES (100)
Working with DB2 UDB Data: Sample Questions 2
8/14/2019 Db2cert4v8 Sample
3/4
DB2 UDB V8.1 Family Fundamentals
9) Which of the following cannot occur with the ALTER TABLE statement?a. Change the name of a columnb. Drop an indexc. Drop a foreign keyd. Add a column
10)Given the following stored procedure:CREATE PROCEDURE proc1 (IN id char(2), OUT code int)
How can it be invoked from the Command Line Processor (CLP)?a.run proc1 (A0, ?)b.call proc1 (A0, ?)c.proc1 (A0, ?)d.call proc1 (A0, ?)
Working with DB2 UDB Data: Sample Questions 3
8/14/2019 Db2cert4v8 Sample
4/4
DB2 UDB V8.1 Family Fundamentals
Answers:
1. c2. a, d3. d4. a5.
c6. b
7. c8. d9. a10.d
Working with DB2 UDB Data: Sample Questions 4