DECLARE cdept CURSOR WITH RETURN TO CALLER FOR SELECT deptno deptname mgrno

Declare cdept cursor with return to caller for select

This preview shows page 4 - 6 out of 9 pages.

DECLARE c_dept CURSOR WITH RETURN TO CALLER FOR SELECT deptno, deptname, mgrno FROM department; OPEN c_emp; OPEN c_dept; END Answer: B QUESTION: 92 Click the Exhibit button. Given the two functions in the exhibit, what is the correct command to invoke the function which calculates the sum of two numbers from an SQL procedure? A. SELECT sum_of_2 FROM table1; B. SELECT sum(2,4,?); C. SET res_sum = sum(2,6); D. CALL sum(?,?,?);
Image of page 4
Answer: C QUESTION: 93 Given the function shown below: CREATE FUNCTION fcn1(v1 VARCHAR(50)) RETURNS VARCHAR(50) SPECIFIC fcn2 RETURN LTRIM(RTRIM(v1)) Which statement will invoke the function? A. SELECT * FROM VALUES LENGTH(fcn2(' one good day ')) B. VALUES LENGTH( fcn1(' one good day ')) C. CALL VALUES LENGTH(fcn1(' one good day ')) D. CALL LENGTH(fcn2(' one good day ')) Answer: B QUESTION: 94 Which statement will let you use the result set from the nested procedure CALLEE? A. ASSOCIATE RESULT SET LOCATOR( loc1) WITH PROCEDURE callee; B. BIND RESULT SET WITH PARAMETERS FOR PROCEDURE callee; C. INSERT RESULT SET FROM callee INTO CURSOR c1; D. SELECT * FROM callee; Answer: A QUESTION: 95 Click the Exhibit button.
Image of page 5
Image of page 6

You've reached the end of your free preview.

Want to read all 9 pages?

  • Fall '20
  • 5%, 3%, 00000

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture