100%(3)3 out of 3 people found this document helpful
This preview shows page 15 - 18 out of 35 pages.
Answer: INPROG-113A / ►Week 16: Creating Procedures / ►Learning Activity 13Procedure can be stored in the database as a schema object.Answer: TrueThe PL/SQL code block helps modularize code by using:Answer: All of the choicesWhich of the following command is used to create a stand-alone procedure that is stored in the Oracle database?Answer: CREATE PROCEDUREWhich of the folllowing does NOT describes subprogram?i. Compiled only onceii. Stored in the databaseiii. Do not return valuesiv. Can take parametersv. Unnamed PL/SQL blocksAnswer: iii & vWhich if the following is NOT a benefits of using modular program constructs?Answer: None of the choicesPROG-113A / ►Week 18: Designing PL/SQL / ►Short Quiz 14Which of the following is the syntax to open a cursor varialAnswer: OPEN cursor_variable_nameFOR 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: TrueEvaluate the following. What will be the output?DECLARE SUBTYPE Accumulator IS NUMBER (4,2); v_amount accumulator;
v_num1 NUMBER; v_num2 NUMBER;v_num3 NUMBER;BEGINv_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: 18Which 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: TrueWhich 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: SubtypeWhich 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: FalsePROG-113A / ►Week 18: Designing PL/SQL / ►Learning Activity 14Which 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 queryRestrictive, specifies a RETURN type, associates only with type-compatible queries are description of a ________________.Answer: Strong REF CURSORWhich 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: SubtypePROG-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 procedureWhich of the folllowing statement describes PL/SQL?
Answer: PL/SQL is an Oracle proprietary, procedural, 3GL programming languageWhich of the following syntax to declare EXCEPTION named e_invalid_id?