These subprograms are compiled and stored in the database
Subprograms
The block structure of the subprograms is similar to the structure of ____ blocks.
anonymous
(T OR F) You cannot invoke a procedure from inside a SQL statement such as SELECT
TRUE
(T OR F) Subprograms are implicitly shared
FALSE
(T OR F) Later subprograms become the building blocks of packages and triggers.
TRUE
(T OR F) In Procedure, all parameters must not be specified
FALSE
(T OR F) The functions used in SQL statements cannot use OUT or IN OUT modes.
TRUE
In PL/SQL ______, the function identifier acts like a variable whose value depends on the parameters passed to it.
EXPRESSIONS
(T OR F) In the stored function, the parameter mode should only be IN
TRUE
The executable section of the procedure body requires a minimum of _____ statement.
1**
In anonymous block, DECLARE states “this is the start of a block”. In Procedure, ____________ states “this is the start of a subprogram”.
CREATE PROCEDURE
Subprograms are named PL/SQL blocks that are compiled and stored in the _______.
DATABASE
(T OR F) In Procedure, all parameter modes must be specified
TRUE
(T OR F) Another way of initializing a default value for parameter is by using assignment operator.
TRUE
(T OR F) The DEFAULT keyword is used to assign a default value for formal parameters.
TRUE
(T OR F) The actual is a special form of a variable, whose input values are initialized by the calling environment when the subprogram is called, and whose output values are returned to the calling environment when the subprogram returns control to the caller.
FALSE (PARAMETERS)
(T OR F) The positional parameter passing uses the associate operator.
FALSE
(T OR F) A procedure can be invoked in another procedure.
TRUE
Using an _______ parameter mode, you can pass a value into a procedure that can be updated within the procedure.
IN OUT
What is the symbol used for association operator?
=>
What is missing in the given code below?
CREATE or replace procedure raise_sal
empid my_employees.employee_id%TYPE := 1234, emp_raise number IS
BEGIN
update employees
set salary = salary + (salary * (emp_raise/100) where employee_id = emp;
END;
Procedure name after END keyword
What is the error of the given code?
BEGIN
add_dept(name =>’new dept’, ‘new location’);
END;
Positional parameter must come before named parameter**
The ____ parameters can be literal values, variables, or expressions that are sent to the parameter list of a called subprogram.
ACTUAL
Functions return only a single value, and the value is returned through a ______ statement.
RETURN