A stored procedure is invoked that can return multiple result sets.
After processing the first result set, which CLI/ODBC API can be used to determine if another
result set exists?
A. SQLGetInfo()
B. SQLFetchScroll()
C. SQLGetData()
D. SQLMoreResults()
正解:D
質問 2:
Given the application shown below:
DECLARE csr1 CURSOR WITH HOLD FOR SELECT * FROM employee;
OPEN csr1;
FETCH csr1;
COMMIT;
CLOSE csr1;
How long does cursor CSR1 remain open?
A. CSR1 remains open until CLOSE csr1 is executed.
B. CSR1 remains open until a COMMIT is executed.
C. CSR1 remains open until the last row is read from the result set.
D. CSR1 remains open until a cursor with a different name is opened.
正解:A
質問 3:
A database contains a table and a view declared as shown below:
CREATE TABLE s1.t1 ( c1 INTEGER, c2 CHAR(20) );
CREATE VIEW s1.v1 AS SELECT * FROM s1.t1;
A system administrator successfully executes the following code:
GRANT CONNECT, IMPLICIT_SCHEMA ON DATABASE TO user1;
GRANT INSERT ON TABLE s1.t1 TO user1;
GRANT CONTROL ON s1.v1 TO user1;
Which SQL statement does user USER1 have privileges to execute?
A. CREATE VIEW user1.v2 AS SELECT * FROM s1.v1
B. UPDATE s1.t1 SET c1 = 2 WHERE c1 IS NULL
C. CREATE PUBLIC ALIAS a1 FOR s1.v1
D. SELECT * FROM s1.t1 WHERE c2 < 100
正解:A
質問 4:
A PHP application using the ibm_db2 extension encounters an error executing the SQL shown
below:
<?php
$applicant = array( $_POST["userid"] );
$stmt = db2_prepare( $conn, "INSERT INTO hr.applicants (userid) VALUES ( ? )" );
if ($stmt) {
$result = db2_execute( $stmt, $applicant );
if (!result) {
// Handle Errors
}
}
>
Which command retrieves the SQLSTATE explaining the error?
A. $this->state = db2_conn_error();
B. $this->state = $conn->get_error()
C. $this->state = db2_stmt_error();
D. $this->state = $stmt->get_error();
正解:C
質問 5:
An ODBC/CLI application invokes the SQLFetch() API resulting in the return code
SQL_SUCCESS_WITH_INFO.
Which two APIs could be used to retrieve the message text explaining the return code? (Choose
two.)
A. SQLGetInfo()
B. SQLGetDiagRec()
C. SQLGetWarning()
D. SQLGetDiagField()
正解:B,D
質問 6:
While developing a Java JDBC application, you use the set of statements shown below:
Connection con;
PreparedStatementpstmt;
intnumUpd;
pstmt= con.prepareStatement("UPDATE EMPLOYEE SET PHONENO='4657' WHERE
EMPNO=?");
pstmt.setString(0, "000010");
numUpd= pstmt.executeUpdate();
pstmt.close();
Assuming a connection has already been established, which statement is true?
A. Statements will give a syntax error.
B. Statements will execute successfully, but will not update rows in the database.
C. Statements will give a runtime exception.
D. Statements will be executed successfully.
正解:C
青叶** -
もちろん合格することが目標ではあるが、見やすく、A2090-543勉強しやすい本だと思いました。