PL/SQL Section 6 Quiz
Section 6
(Jawab semua pertanyaan di bagian ini)
1. 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_dept_info_rec dept_info_type;
v_emp_dept_rec emp_dept_type;
How many fields can be addressed in v_dept_info_rec?
Correct
2. The following code declares a PL/SQL record with the same structure as a row of the departments table. True or False?
DECLARE
v_dept_rec departments%ROWTYPE;
...
Correct
3. You can use %ROWTYPE with tables and views.
Correct
4. You can store a whole record in a single variable using %ROWTYPE or by creating your own record structure as a type and then declaring a variable of that type.
Correct
5. Which of the following will successfully create a record type containing two fields, and a record variable of that type?
Komentar
Posting Komentar