Given the SQL statement shown below:
UPDATE address SET number_street =
(SELECT address FROM employee
WHERE address.empid = employee.empid)
WHERE number_street IS NULL
Which comment is true?
A. The UPDATE operation will succeed only if ADDRESS.EMPID has been defined as a primary key.
B. The UPDATE operation will succeed only if the data retrieved by the sub query does not contain duplicate values for EMPLOYEE.EMPI
C. The UPDATE operation will succeed only if the ADDRESS table does not contain duplicate values for EMPID.
D. The UPDATE operation will succeed only if both ADDRESS.EMPID and EMPLOYEE.EMPID have been defined as primary keys.
正解:B
質問 2:
Which object can be invoked on a single invocation to return both output parameters and a result set back to the invoking application?
A. module
B. table function
C. procedure
D. method
正解:C
質問 3:
.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?
A. SQL_SUCCESS
B. SQL_SUCCESS_WITH_INFO
C. SQL_ERROR
D. SQL_INVALID_HANDLE
正解:A
質問 4:
A table named INVENTORY was created by executing the SQL statement shown below:
CREATE TABLE inventory (part_no INTEGER, quantity INTEGER, price DECIMAL(7,2), status
CHAR(2));
If items are indicated to be out of stock by setting STATUS to NULL and QUANTITY to zero, which
SQL statement updates the INVENTORY table to indicate that all items with part numbers below
150 are out of stock?
A. UPDATE inventory SET (status, quantity) = ('NULL', 0) WHEREpart_no < 150
B. UPDATE inventory SET (status, quantity) = (NULL, 0) WHEREpart_no < 150
C. UPDATE inventory SET status = 'NULL', quantity = 0 WHEREpart_no < 150
D. UPDATE inventory SET status = NULL, SET quantity = 0 WHEREpart_no < 150
正解:B
質問 5:
Click the Exhibit button. CREATE TABLE s1.mytab (col1 INTEGER GENERATED ALWAYS AS IDENTITY, col2 INTEGER, col3 INTEGER, CHECK (col1+col3 < 500) CREATE VARIABLE s1.var1 INTEGER DEFAULT (99) CREATE FUNCTION s1.add100 (p1 INT, p2 INT) RETURNS INTEGER LANGUAGE SQL DETERMINISTIC NOT FENCED BEGIN SET p1= p2+100; RETURN p1;END Given the table, variable, and function definitions shown in the exhibit, which two statements contain a valid invocation of the add100 function? (Choose two.)
A. SELECT outcol.* FROM TABLE(add100(col2,col3)) ASoutcol
B. SET var1 = ABS(add100(1,99))
C. SELECT col1, add100(col2,col3) ASoutcol FROM mytab
D. SELECT col1,outcol=add100(col2,col3) FROM mytab
正解:B,C
質問 6:
Which two SQL statements demonstrate the correct usage of a parameter marker? (Choose two.)
A. VALUES(?) INTO :hvar1
B. SET CURRENT SQLID = ?
C. SELECT ? FROM employee
D. DELETE FROM employee WHEREempno = ?
正解:B,D
Shiina -
問題集を一通りやった後、模擬問題をひたすら解き、先日試験を受けてきました。
そして、試験に合格することが出来ました。とてもありがとうございました。