PL/SQL Section 14 Quiz
ALTER TABLE employees ADD (gender CHAR(1));
Which one of the following statements is true?
emp_proc will be marked invalid and needs to be recompiled. True or False?
CREATE FUNCTION deptfunc
RETURN NUMBER IS
v_count NUMBER(6);
BEGIN
SELECT COUNT(*) INTO v_count FROM departments;
RETURN v_count;
END;
Which of the following will display the dependency between DEPTFUNC and DEPARTMENTS?
- Procedure A is local and has a time stamp of 10 AM
- Procedure B is remote and has a local time stamp of 5 AM and has a remote time stamp of 4 AM
In Timestamp Mode, Procedure A will execute successfully at 11 AM. True or False?
- Procedure A is local and has a time stamp of 10 AM
- Procedure B is remote and has a local and remote time stamp of 10:30 AM
In Timestamp Mode, Procedure A, which is dependent on Procedure B, will execute successfully at 11 AM. True or False?
- Procedure A is local, executed, and invalidated because the remote Procedure B time stamp does not match the local time stamp for Procedure B
- Procedure A is recompiled.
In Timestamp Mode, now Procedure A will execute successfully. True or False?
CURSOR loc_curs IS SELECT location_id, city, country_id FROM locations;
Which of the following changes to the LOCATIONS table will allow the procedure to be recompiled successfully without editing its code? (Choose two.)
>NESTED_LEVEL | >TYPE | >NAME |
>0 | >TABLE | >EMPLOYEES |
>1 | >VIEW | >EMP_VW |
>2 | >PROCEDURE | >ADD_EMP |
>1 | >PROCEDURE | >QUERY_EMP |
What dependencies does this show? (Choose three.)
CREATE VIEW ed_view AS
SELECT * FROM employees NATURAL JOIN departments;
CREATE PROCEDURE ed_proc IS
CURSOR ed_curs IS SELECT * FROM ed_view;
Which of the following statements about dependencies are true? (Choose two.)
ALTER PROCEDURE get_depts RECOMPILE;
ALTER PROCEDURE get_depts COMPILE;(*)
SELECT first_name, salary INTO v_first_name, v_salary
FROM employees WHERE employee_id = 100;
Which of the following changes to the employees table will allow the procedure to be recompiled successfully ? (Choose two.)
CREATE FUNCTION deptfunc
RETURN NUMBER IS
v_count NUMBER(6);
BEGIN
SELECT COUNT(*) INTO v_count FROM departments;
RETURN v_count;
END;
Which of the following will display the dependency between DEPTFUNC and DEPARTMENTS?
FROM user_dependencies
WHERE name = 'DEPARTMENTS'
AND type = 'TABLE';
FROM user_dependencies
WHERE name IN ('DEPTFUNC','DEPARTMENTS');
FROM user_dependencies
WHERE referenced_name = 'DEPARTMENTS'
AND referenced_type = 'TABLE'; (*)
FROM user_objects
WHERE object_name IN ('DEPARTMENTS','DEPTFUNC')
AND referenced = 'YES';
Komentar
Posting Komentar