0% found this document useful (0 votes)
2K views

Persistent State of Package Variables

The document is a quiz about package variables in Oracle PL/SQL. 1. A package's state is initialized when the package is first loaded. 2. A cursor's state is defined only by whether it is open or closed and how many rows it holds. 3. The best line to fit in the code example is to open the cursor, as the package variables would be initialized when the package is first loaded.

Uploaded by

Catalina Achim
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2K views

Persistent State of Package Variables

The document is a quiz about package variables in Oracle PL/SQL. 1. A package's state is initialized when the package is first loaded. 2. A cursor's state is defined only by whether it is open or closed and how many rows it holds. 3. The best line to fit in the code example is to open the cursor, as the package variables would be initialized when the package is first loaded.

Uploaded by

Catalina Achim
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 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