The table PERSON is declared as shown below:
CREATE TABLE xmltest (id BIGINT, info XML)
What is the column type for the result of the following statement?
SELECT t.* FROM
xmltest,
XMLTABLE (
'$INFO/question'
) AS t
Given the SQL statement shown below:
UPDATE employee SET lastname = CAST(? AS VARCHAR(12))
WHERE empno = ?00050??
What does CAST(? AS VARCHAR(12)) represent?
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?
An application connecting to a DB2 database using the IBM Data Server Provider for .NET is seeing performance degradation after 100 active users. Which Visual Basic .NET command string enables the re-use of the database connections?
.While developing a CLI application, you use the code shown below:
SQLCHAR *stmt = (SQLCHAR *)"DELETE FROM org WHERE deptnumb = ? ";
cliRC= SQLSetStmtAttr(hstmt, SQL_ATTR_DEFERRED_PREPARE,
SQL_DEFERRED_PREPARE_ON )
cliRC= SQLPrepare(hstmt, stmt, SQL_NTS);
Now, the ORG table does not exist in the database. What will be the value of "cliRC" after executing the SQLPrepare command?
Which steps are necessary to issue a batch update using a single SQL statement? (Note: The statement has several sets of input parameter markers and is issued from a database application using the IBM Data Server Driver for JDBC.)
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?
While developing a Java JDBC application, you use the set of statements shown below:
Connection con;
Statement stmt;
int numUpd;
stmt = con.createStatement();
numUpd= stmt.executeUpdate("UPDATE EMPLOYEE SET PHONENO='4657' WHERE EMPNO=?");
stmt.close();
con.close();
Assuming a connection has already been established, which statement is true?
A CLI/ODBC application contains the lines of code shown below:
SQLHANDLE hstmt; /* statement handle */
SQLCHAR *stmt = (SQLCHAR *)"DELETE FROM org WHERE deptnumb = ? ";
SQLSMALLINT parameter1=5;
Which CLI/ODBC API will use the current value of PARAMETER1?