Click the Exhibit button.
A user-defined function was created using the statement shown in the exhibit. Which additional option can be added to the CREATE FUNCTION statement to tell the optimizer that the function does not always return the same results for a given argument value?
A. STATIC DISPATCH
B. NO EXTERNAL ACTION
C. NOT FENCED
D. NOT DETERMINISTIC
正解:D
質問 2:
Which action is supported by Data Studio in the SQL procedure lifecycle?
A. Use auto complete SQL statements.
B. Create global temporary tables to use in the SQL procedure.
C. Debug the SQL procedure.
D. Create user-define types in the SQL procedure.
正解:C
質問 3:
Which statement will successfully create an SQL procedure that returns the name of the current month?
A. CREATE PROCEDURE proc.current_month(OUT month VARCHAR(20))
BEGIN
DECLARE today DATE;
SET (today = CURRENT_DATE);
SET month = MONTHNAME(today);
END
B. CREATE PROCEDURE proc.current_month(OUT month VARCHAR(20))
BEGIN
DECLARE today DATE;
VALUES (CURRENT_DATE) INTO today;
SET month = MONTHNAME(today);
END
C. CREATE PROCEDURE proc.current_month(OUT month VARCHAR(20))
BEGIN
SET month = MONTHNAME(SELECT (CURRENT_DATE))
END
D. CREATE PROCEDURE proc.current_month(OUT month VARCHAR(20))
BEGIN
DECLARE today DATE;
SELECT (CURRENT_DATE) INTO today;
SET month = MONTHNAME(today);
END
正解:B
質問 4:
Which of the following CURSOR declare statement is incorrect?
A. DECLARE c1 INSENSITIVE CURSOR WITH RETURN TO CLIENT FOR SELECT * FROM tab1
B. DECLARE c1 SENSITIVE CURSOR WITH RETURN TO CLIENT FOR SELECT * FROM tab1
C. DECLARE c1 ASENSITIVE CURSOR WITH RETURN TO CLIENT FOR SELECT * FROM tab1
D. DECLARE c1 CURSOR WITHOUT RETURN FOR SELECT * FROM tab1
正解:B
質問 5:
Which two statements are true with regards to nesting SQL procedures? (Choose two.)
A. An SQL procedure defined with the CONTAINS SQL clause can invoke an SQL procedure defined with the NO SQL clause.
B. An SQL procedure defined with the CONTAINS SQL clause can invoke an SQL procedure defined with the READS SQL DATA clause.
C. An SQL procedure defined with the CONTAINS SQL clause can invoke an SQL procedure defined with the MODIFIES SQL DATA clause.
D. An SQL procedure can invoke the same SQL procedure more than once.
E. An SQL procedure cannot invoke procedures built in other languages (e.g., C, Java).
正解:A,D
質問 6:
In which type of table space must global temporary tables be created?
A. SYSTEM TEMPORARY
B. USER TEMPORARY
C. LONG
D. REGULAR
正解:B
質問 7:
Which tool can be used to get quick static SQL Explain data from packages?
A. db2expln
B. db2exfmt
C. DB2 command center
D. Control Center
正解:A
質問 8:
Which of the following steps are required to debug a stored procedure using IBM Data Studio?
A. Deploy the stored procedure from the data development project, choose option for debugging and then debug.
B. Debug the stored procedure from the Data Source Explorer.
C. Deploy the stored procedure from the data development project, debug the stored procedure.
D. Debug the stored procedure from the IBM Data Studio command line console.
正解:A
質問 9:
Given the variable declaration shown below: DECLARE v_mydate DATE; Which statement will assign a value to the variable V_MYDATE?
A. SELECT CURRENT TIMESTAMP INTO v_mydate FROM SYSIBM.SYSDUMMY1;
B. SELECT CURRENT DATE INTO v_mydate FROM SYSIBM.SYSDUMMY1;
C. VALUES CURRENT TIMESTAMP INTO v_mydate;
D. VALUES (08262010) INTO v_mydate;
正解:B