Given the following tables:
YEAR_2006 -
EMPID NAME -
----- ---------------
1 Jagger, Mick
2Richards, Keith
3 Wood, Ronnie
4 Watts, Charlie
5 Jones, Darryl
6 Leavell, Chuck
YEAR_1962 -
EMPID NAME -
----- ---------------
1 Jagger, Mick
2 Richards, Keith
3 Jones, Brian
4 Wyman, Bill
5 Watts, Charlie
6 Stewart, Ian
If the following SQL statement is executed, how many rows will be returned?
SELECT name FROM year_2007 -
UNION ALL -
SELECT name FROM year_1962 -
Answer : D
Which of the following is the lowest cost DB2 product that can be legally installed on a
Linux server that has 6 CPUs?
Answer : D
Which of the following describes how DB2 9 stores an XML document if the
XMLExtender is not used?
Answer : C
Given the following table and XML data stored in the CONTACTINFO column:
CREATE TABLE clients(
id INT PRIMARY KEY NOT NULL,
name VARCHAR(50),
statusVARCHAR(10),
contactinfo XML)
<Client>
<Address>
<street>25 EastCreek</street>
<city>Toronto</city>
<prov-state>Ontario</prov-state>
<pcode-zip>M8X-3T6</pcode-zip>
</Address>
<phone>
<work>4165551358</work>
<home>9051112222</home>
<fax>9051112222</fax>
</phone>
<preferredcontact>by fax</preferredcontact>
</Client>
What is the result of the following XQuery expression?
for $y in db2-fn:xmlcolumn('CLIENTS.CONTACTINFO')/Client//fax return $y
Answer : B
Which of the following tools for DB2 V9 allows a user to create and debug a
SQL stored procedure?
Answer : C
Given the following requirements:
Create a table to contain employee data, with a unique numeric identifier automatically assigned when a row is added, has an EDLEVEL column that permits only the values 'C',
'H' and 'N', and permits inserts only when a corresponding value for the employee's department exists in the DEPARTMENT table.
Which of the following CREATE statements will successfully create this table?
Answer : D
Which ofthe following database objects can be used to raise an error if a table is updated?
Answer : B
Which of the following will DELETE all of the rows from table T03?
Answer : D
A table was created using the following DDL:
CREATE TABLE employee -
(id SMALLINT NOT NULL,
name VARCHAR(9),
dept SMALLINT CHECK (dept BETWEEN 10AND 100),
job CHAR(10) CHECK (job IN ('Sales','Mgr','Clerk')),
hiredate DATE,
salary DECIMAL(7,2),
comm DECIMAL(7,2),
PRIMARY KEY (id),
CONSTRAINT yearsal CHECK (YEAR(hiredate) > 2004 OR salary > 80500)
);
Which of the following INSERT statements will fail?
Answer : D
Which of the following commandsis used to retrieve database names from the local catalog for DRDA host databases on System i and System z?
Answer : B
Consider the following table called EMPLOYEES:
ID FIRSTNAME LASTNAME JOB LEVEL -
------------------------------------------------------------
1 Paul Jones DBA 2
2 George Baker MGR 1
3 Roger Melvin CLERK 3
4 Jim Smith MGR1
5 Kevin Street CLERK 3
6 Chris Eaton MGR 1
If the following SQL statement is executed, how many rows will be deleted? DELETE
FROM employees WHERE 1 = 1 -
Answer : D
Given the following table definitions:
EMPLOYEES -
------------------------------------------------
EMPID INTEGER -
NAME CHAR(20)
DEPTID CHAR(3)
SALARY DECIMAL(10,2)
COMMISSION DECIMAL(8,2)
DEPARTMENTS -
------------------------------------------------
DEPTNO INTEGER -
DEPTNAME CHAR(20)
Which of the following statements will produce a result data set that satisfies all of these conditions:
>Displays the total number of employees in each department
>> Displays the corresponding department name for each department ID
>> Sorted by department employee count, from greatest to least
Answer : B
Whileattempting to connect to a database stored on an iSeries server from a Windows client, the following message was displayed:
SQL1013N The database alias name or database name "TEST_DB" could not be found.
Which of the following actions can be used to help determine why this message was displayed?
Answer : D
Which of the following DB2 data types can be used tostore 1000 MB of single-byte character data?
Answer : B