You are on page 1of 2

Test: Quiz: Persistent State of Package Variables 1. A package's state is initialized when the package is first loaded.

True or False? Mark for Review (1) Points True (*) False

Correct 2. A cursor's state is defined only by whether it is open or closed and, i f open, how many rows it holds. True or False? Mark for Review (1) Points True False (*)

Correct 3. In the following example, which statement best fits in Line 1? (Choose 1 ) DECLARE v_more_rows_exist BOOLEAN := TRUE; BEGIN -- Line 1 LOOP v_more_rows_exist := curs_pkg.fetch_n_rows(3); DBMS_OUTPUT.PUT_LINE('-------'); EXIT WHEN NOT v_more_rows_exist; END LOOP; curs_pkg.close_curs; END; Mark for Review (1) Points curs_pkg.emp_curs%ISOPEN; curs_pkg.close_curs; curs_pkg.open_curs; (*) EXIT WHEN curs_pkg.emp_curs%NOTFOUND;

Incorrect. Refer to Section 11 Lesson 1. 4. Users A and B call the same procedure in a package to initialize a glob al variable my_pkg.g_var. What will be the value of my_pkg.g_var for User A at P oint A? User A: my_pkg.g_var is 10 User B: my_pkg.g_var is 10 User A: my_pkg.g_var is 50 User B: my_pkg.g_var is 25 Point A Mark for Review (1) Points 10 50 (*) 25

Incorrect. Refer to Section 11 Lesson 1.

You might also like