Click the Exhibit button.
CONNECT TO test;
CREATE TABLE project (projno CHAR(6), deptno CHAR(3), projname VARCHAR(20));
CREATE TABLE employee (empno CHAR(6), lastname VARCHAR(25), deptno CHAR(3));
COMMIT;
CONNECT RESET;
A DB2 Command Line Processor script file containing the commands and statements shown in
the exhibit was executed successfully.
Which query will produce a list of all projects and all employees assigned to projects and also
include employees that have not been assigned a project?
A. SELECTempno,lastname, employee.deptno, projname FROM employee FULL OUTER JOIN project ON employee.deptno = project.deptno
B. SELECTempno, lastname, employee.deptno, projname FROM employee LEFT OUTER JOIN project ON employee.deptno = project.deptno
C. SELECTempno, lastname, employee.deptno, projname FROM employee JOIN project ON employee.deptno = project.deptno
D. SELECTempno, lastname, workdept, projname FROM employee RIGHT OUTER JOIN project ON employee.deptno = project.deptno
正解:B
質問 2:
A PHP Web application uses the ibm_db2 extension to establish a persistent connection to a remote database. What must be true of the connections to make full use of the db2_pconnect() API?
A. The persistent connection must be explicitly closed after the database work has completed.
B. Connections must be established under the same user authentication credentials.
C. The commitment control mode must be set toautocommit mode.
D. The commitment control mode must be set to manual commit mode.
正解:B
質問 3:
.In a PHP script, which ibm_db2 functions should be used if the user wants to retrieve a row in a result set as an array, indexed by column name?
A. db2_fetch_array()
B. db2_fetch_object()
C. db2_fetch_assoc()
D. db2_fetch_both()
正解:C
質問 4:
Which statement should be used to obtain the result set shown below?
<Root>
<First>Hello</First>
<Second>World !</Second>
<?Test Pass test?>
</Root>
A. VALUES XMLDOCUMENT(
XMLELEMENT (NAME "Root",
XMLELEMENT(NAME "First", 'Hello'),
XMLELEMENT(NAME "Second", 'World !'),
XMLTEXT ('Test Pass test')
)
)
B. VALUES XMLDOCUMENT(
XMLELEMENT (NAME "Root",
XMLELEMENT(NAME "First", 'Hello'),
XMLELEMENT(NAME "Second", 'World !'),
XMLATTRIBUTES ( 'Pass test' as "test")
)
)
C. VALUES XMLDOCUMENT(
XMLELEMENT (NAME "Root",
XMLFOREST(
'Hello' as "First",
'World !' as "Second"
),
XMLPI (NAME "Test", 'Pass test')
)
)
D. VALUES XMLDOCUMENT(
XMLELEMENT (NAME "Root",
XMLFOREST(
'Hello' as "First",
'World !' as "Second"
),
XMLCOMMENT ('Test Pass test')
)
)
正解:C
質問 5:
Click the Exhibit button.
CONNECT TO test;
CREATE TABLE tab_a (col1 INT);
CREATE TABLE tab_b (col1 INT);
INSERT INTO tab_a VALUES (1), (2), (3), (4);
INSERT INTO tab_b VALUES (1), (2), (2), (3);
CONNECT RESET;
A DB2 Command Line Processor script file containing the commands and statements shown in
the exhibit executed successfully.
If the statement shown below is executed:
DELETE FROM tab_a WHERE col1 IN (SELECT DISTINCT * FROM tab_b);
How many rows will be removed from table TAB_A?
A. 0
B. 1
C. 3
D. 2
正解:C