FORMATIVE 3 Flashcards

1
Q

The block structure of the subprograms is similar to the structure of (ANONYMOUS) blocks.

True or False

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

The (SUBPROGRAMS) are named PL/SQL bocks that are compiled and stored in the database.

True or False

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

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

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

You can invoke a procedure from inside an SQL statement.

True or False

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

To invoke a procedure from another procedure, use a direct call inside an executable section of the block.

True or False

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

The formal parameters can be literal values, variables, or expressions that are sent to the parameter list of a called subprogram.

True or False

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

A procedure can be invoked in another procedure.

True or False

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

The IN parameters can only be read within the procedure and cannot be modified.

True or False

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

The DEFAULT keyword is used to assign a default value for formal parameters.

True or False

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Which can be used to assign a default value to IN parameters?

:=

Assignment operator

DEFAULT

All the options

A

All the options

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

The parameter modes are specified in:

FORMAL PARAMETER

ACTUAL PARAMETER

A

FORMAL PARAMETER

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

The type of parameter that is declared in procedure heading is called ______.

ACTUAL

FORMAL

A

FORMAL

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Which type of parameter passing uses an association operator?

Positional

Named

IN OUT

Combination

A

Named

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

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

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

In PL/SQL (EXPRESSIONS), the function identifier acts like a variable whose value depends on the parameters passed to it.

True or False

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

The functions used in SQL statements cannot use ____ or IN OUT modes.

OUT

IN

A

OUT

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

The (OR REPLACE) is added to CREATE PROCEDURE clause to overwrite an existing procedure.

True or False

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

In Procedure, the default parameter mode is (IN).

True or False

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

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

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

The positional parameter passing uses the associate operator.

True or False

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

The Positional parameter passing is the common method of passing parameters.

True or False

21
Q

Another way of initializing a default value for parameter is by using assignment operator.

True or False

22
Q

A function must have a (RETURN) clause in the header and at least one RETURN statement in the executable section..

True or False

23
Q

The purpose of the OR REPLACE clause is to (OVERWRITE) an existing procedure.

True

False

24
A procedure is compiled and stored in the database as a schema object. True False
True
25
In the given Procedure header, the underlined clause/keyword is optional. CREATE OR REPLACE PROCEDURE name [parameters] IS|AS True False
True
26
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
27
The OUT parameter mode supplies an input value, which can be returned (output) as a modified value. True False
False
28
If Combination notation is used, the positional parameters must come first before the named parameters. True False
True
29
If Combination notation is used, the _______ parameters must come first. POSITIONAL NAMED
POSITIONAL
30
The _____ parameters can be literal values, vairables, or expressions that are sent to the paramter list ofa called subprogram. FORMAL ACTUAL
ACTUAL
31
Which parameter mode can be assigned a default value? IN OUT IN OUT ------- IN OUT IN OUT
IN
32
A stored function must return exactly (ONE) value. True False
True
33
Subprograms are named PL/SQL blocks that are compiled and stored in the (DATABASE). True False
True
34
Subprograms are implicitly shared. True False
False
35
Subprograms are explicitly shared. True False
True
36
The operator => is called ______. Referencing operator Reference operator Associate operator Association operator
Association operator
37
The functions used in SQL statement cannot used OUT or ____ modes. IN IN OUT
IN OUT
38
What follows the RETURN keyword at the function header? VARIABLE DATA TYPE IS PARAMETER
DATA TYPE
39
The block structure of the subprograms is similar to the structure of anonymous blocks. True False
True
40
In the given Procedure header, the underlined clause/keyword is optional. CREATE OR REPLACE PROCEDURE name [parameters] IS|AS True False
True
41
We can assign a default value to parameters. True False
False
42
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
43
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
44
In the given Procedure header, the ________clause is optional. CREATE OR REPLACE PROCEDURE name [parameters] IS|AS OR REPLACE True False
True
45
You cannot invoke a procedure from inside an SQL statement. True False
True
46
The Named parameter passing is the common method of passing parameters. True False
False
47
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
48
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
49
In stored function, the parameter mode should only be (IN) True False
True
50
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