In an INDEX BY table of records
the record can be _______________________.
%ROWTYPE
a user-defined record
Either one. (*)
2.
Which of the following
successfully declares an INDEX BY table of records which could be used to
store copies of complete rows from the departments table?
DECLARE
TYPE t_depttab IS INDEX BY TABLE OF departments%ROWTYPE
INDEX BY BINARY_INTEGER;
DECLARE
TYPE t_depttab IS TABLE OF departments%TYPE
INDEX BY BINARY_INTEGER;
DECLARE
TYPE t_depttab IS TABLE OF departments%ROWTYPE
INDEXED BY NUMBER;
DECLARE
TYPE t_depttab IS TABLE OF departments%ROWTYPE
INDEX BY BINARY_INTEGER;
(*)
Correct
3.
To declare an INDEX BY table,
we must first declare a type and then declare a collection variable of that
type. True or False?
True (*)
False
Correct
4.
An INDEX BY TABLE type can only
have one data field.
True (*)
False
Correct
5.
An INDEX BY TABLE primary key
cannot be negative.
true
false(*)
6.
Which of these PL/SQL data
structures could store a complete copy of the employees table, i.e., 20
complete table rows?
An INDEX BY table of records
(*)
An explicit cursor based on
SELECT * FROM employees;
An INDEX BY table
A record
Correct
7.
Which of these PL/SQL data
structures can NOT store a collection?
An INDEX BY table indexed by
BINARY_INTEGER
An INDEX BY table of records
An INDEX BY table indexed by
PLS_INTEGER
A PL/SQL record (*)
Correct
8.
Identify the valid collection
types:
(Choose all correct answers)
INDEX BY TABLE OF RECORDS (*)
INDEX BY TABLE OF ROWS
INDEX BY VIEW
INDEX BY TABLE (*)
9.
What is the largest number of
elements (i.e., records) that an INDEX BY table of records can contain?
100
None of these.
4096
32767
Many millions of records
because a BINARY_INTEGER or PLS_INTEGER can have a very large value (*)
Correct
10.
Which of the following methods
can be used to reference elements of an INDEX BY table? (Choose three.)
(Choose all correct answers)
EXISTS (*)
DROP
COUNT (*)
PREVIOUS
FIRST (*)
11.
You can use %ROWTYPE with
tables and views.
True (*)
False
Correct
12.
Consider the following code:
DECLARE
TYPE dept_info_type IS RECORD
(department_id departments.department_id%TYPE,
department_name departments.department_name%TYPE);
TYPE emp_dept_type IS RECORD
(first_name employees.first_name%TYPE,
last_name employees.last_name%TYPE),
dept_info dept_info_type);
v_emp_dept_rec emp_dept_type;
How many fields can be addressed in v_emp_dept_rec?
four (*)
two
one
three
13.
Consider the following code:
DECLARE
TYPE dept_info_type IS RECORD
(department_id departments.department_id%TYPE,
department_name departments.department_name%TYPE);
TYPE emp_dept_type IS RECORD
(first_name employees.first_name%TYPE,
last_name employees.last_name%TYPE),
dept_info dept_info_type);
0 Komentar