FORMATIVE 3 Flashcards
The block structure of the subprograms is similar to the structure of (ANONYMOUS) blocks.
True or False
True
The (SUBPROGRAMS) are named PL/SQL bocks that are compiled and stored in the database.
True or False
A procedure is a PL/SQL block containing local variables, a BEGIN, and an END. The procedure_name after the END keyword is optional.
True or False
True
You can invoke a procedure from inside an SQL statement.
True or False
False
To invoke a procedure from another procedure, use a direct call inside an executable section of the block.
True or False
True
The formal parameters can be literal values, variables, or expressions that are sent to the parameter list of a called subprogram.
True or False
False
A procedure can be invoked in another procedure.
True or False
True
The IN parameters can only be read within the procedure and cannot be modified.
True or False
True
The DEFAULT keyword is used to assign a default value for formal parameters.
True or False
False
Which can be used to assign a default value to IN parameters?
:=
Assignment operator
DEFAULT
All the options
All the options
The parameter modes are specified in:
FORMAL PARAMETER
ACTUAL PARAMETER
FORMAL PARAMETER
The type of parameter that is declared in procedure heading is called ______.
ACTUAL
FORMAL
FORMAL
Which type of parameter passing uses an association operator?
Positional
Named
IN OUT
Combination
Named
When invoking a function as part of a PL/SQL expression, you can use a (LOCAL VARIABLE) to store the returned result.
True or False
True
In PL/SQL (EXPRESSIONS), the function identifier acts like a variable whose value depends on the parameters passed to it.
True or False
True
The functions used in SQL statements cannot use ____ or IN OUT modes.
OUT
IN
OUT
The (OR REPLACE) is added to CREATE PROCEDURE clause to overwrite an existing procedure.
True or False
True
In Procedure, the default parameter mode is (IN).
True or False
True
In anonymous block, DECLARE states “this is the start of a block”. In Procedure, (CREATE PROCEDURE) states “this is the start of a subprogram”.
True or False
True
The positional parameter passing uses the associate operator.
True or False
False
The Positional parameter passing is the common method of passing parameters.
True or False
True
Another way of initializing a default value for parameter is by using assignment operator.
True or False
False
A function must have a (RETURN) clause in the header and at least one RETURN statement in the executable section..
True or False
True
The purpose of the OR REPLACE clause is to (OVERWRITE) an existing procedure.
True
False
True
A procedure is compiled and stored in the database as a schema object.
True
False
True
In the given Procedure header, the underlined clause/keyword is optional.
CREATE OR REPLACE PROCEDURE name [parameters] IS|AS
True
False
True
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.
True
False
False
The OUT parameter mode supplies an input value, which can be returned (output) as a modified value.
True
False
False
If Combination notation is used, the positional parameters must come first before the named parameters.
True
False
True
If Combination notation is used, the _______ parameters must come first.
POSITIONAL
NAMED
POSITIONAL
The _____ parameters can be literal values, vairables, or expressions that are sent to the paramter list ofa called subprogram.
FORMAL
ACTUAL
ACTUAL
Which parameter mode can be assigned a default value?
IN
OUT
IN OUT
IN
OUT
IN OUT
IN
A stored function must return exactly (ONE) value.
True
False
True
Subprograms are named PL/SQL blocks that are compiled and stored in the (DATABASE).
True
False
True
Subprograms are implicitly shared.
True
False
False
Subprograms are explicitly shared.
True
False
True
The operator => is called ______.
Referencing operator
Reference operator
Associate operator
Association operator
Association operator
The functions used in SQL statement cannot used OUT or ____ modes.
IN
IN OUT
IN OUT
What follows the RETURN keyword at the function header?
VARIABLE
DATA TYPE
IS
PARAMETER
DATA TYPE
The block structure of the subprograms is similar to the structure of anonymous blocks.
True
False
True
In the given Procedure header, the underlined clause/keyword is optional.
CREATE OR REPLACE PROCEDURE name [parameters] IS|AS
True
False
True
We can assign a default value to parameters.
True
False
False
What is missing in the given code below?
CREATE or replace procedure raise_sal
(empid my_employees.employee_id%TYPE := 1234, emp_raise number)
BEGIN
update employees set salary = salary + (salary * (emp_raise/100) where employee_id = emp;
END;
Nothing is missing
Not in the options
IN
Not in the options
A function can be called as a part of:
Not in the options
SQL statement
SQL statement, PL/SQL expression
PL/SL expressoin
SQL statement, PL/SQL expression
In the given Procedure header, the ________clause is optional.
CREATE OR REPLACE PROCEDURE name [parameters] IS|AS
OR REPLACE
True
False
True
You cannot invoke a procedure from inside an SQL statement.
True
False
True
The Named parameter passing is the common method of passing parameters.
True
False
False
The code below is a correct example of passing parameters by combination notation.
add_dept (p_loc=>1400, ‘EDUCATION’ );
Group of answer choices
True
False
False
Given the procedure below, how many parameters will return a value to the calling environment?
CREATE OR REPLACE PROCEDURE show_emps
(p_emp_id NUMBER, p_department_id OUT number,
p_hiredate IN OUT DATE) IS
begin
. . . . . .
End;
2
0
1
3
2
In stored function, the parameter mode should only be (IN)
True
False
True
What is missing in the code below?
create or replace function sample
return number
is
begin
return 5+5;
end;
Variable
Nothing is missing
Formal parameter
Expression evaluation
Nothing is missing