Answer IN PROG 113A Week 16 Creating Procedures Learning Activity 13 Procedure

Answer in prog 113a week 16 creating procedures

This preview shows page 15 - 18 out of 35 pages.

Answer: IN PROG-113A / Week 16: Creating Procedures / Learning Activity 13 Procedure can be stored in the database as a schema object. Answer: True The PL/SQL code block helps modularize code by using: Answer: All of the choices Which of the following command is used to create a stand-alone procedure that is stored in the Oracle database? Answer: CREATE PROCEDURE Which of the folllowing does NOT describes subprogram? i. Compiled only once ii. Stored in the database iii. Do not return values iv. Can take parameters v. Unnamed PL/SQL blocks Answer: iii & v Which if the following is NOT a benefits of using modular program constructs? Answer: None of the choices PROG-113A / Week 18: Designing PL/SQL / Short Quiz 14 Which of the following is the syntax to open a cursor varial Answer: OPEN cursor_variable_name FOR select_statement; Which of the following is the syntax to define a REF CURSOR type? Answer: TYPE ref_type_name IS REF CURSOR [RETURN return_type]; Weak REF CURSOR is very flexible. Answer: True Evaluate the following. What will be the output? DECLARE SUBTYPE Accumulator IS NUMBER (4,2); v_amount accumulator;
Image of page 15
v_num1 NUMBER; v_num2 NUMBER; v_num3 NUMBER; BEGIN v_amount := 10.50; v_num1 := 1; v_num2 := 2; v_num3 := 3; v_num1 := v_amount; v_num2 := v_num1 + v_amount; v_num2 := v_num2 - v_num3; dbms_output.put_line('Total is: ' || v_num2); END; Answer: 18 Which of the following is the syntax to fetch from a cursor variable? Answer: FETCH cursor_variable_name INTO variable_name1 [,variable_name2,. . .] | record_name; Fetch into a record when fetching from a cursor. Answer: True Which of the following is the syntax to close a cursor? Answer: CLOSE cursor_variable_name; This is a subset of an existing data type that may place a constraint on its base type. Answer: Subtype Which of the following rules is INCORRECT about cursor variables? Answer: None of the choices. Use column aliases in cursors for calculated columns fetched into records declared with %COLUMNTYPE. Answer: False PROG-113A / Week 18: Designing PL/SQL / Learning Activity 14 Which of the following rules is INCORRECT about cursor variables? Answer: None of the choices. Which of the following describes weak REF CURSOR? Answer: Associates with any query Restrictive, specifies a RETURN type, associates only with type-compatible queries are description of a ________________. Answer: Strong REF CURSOR Which of the following is INCORRECT about the guidelines for cursor design? Answer: Use column aliases in cursors for calculated columns fetched into records declared with %COLUMNTYPE. This is a subset of an existing data type that may place a constraint on its base type. Answer: Subtype PROG-113A / Week 15: Long Quiz / Long Quiz 3 (30/30) (Correction) How do you test the output of a PL/SQL block? Answer: Use a predefined Oracle package and its procedure Which of the folllowing statement describes PL/SQL?
Image of page 16
Answer: PL/SQL is an Oracle proprietary, procedural, 3GL programming language Which of the following syntax to declare EXCEPTION named e_invalid_id?
Image of page 17
Image of page 18

You've reached the end of your free preview.

Want to read all 35 pages?

  • Spring '18
  • Sir Nasayao
  • Salary

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture