Get the App
SLTechnology News&Howtos  ›  Database  › 

2011-10-06 references to variables after modifying the header

Shulou Source: shulou.com Published: 2022-06-01 05:18:38 10月30日 Update

Http://www.itpub.net/thread-1499223-2-1.html

13th floor

Any user with CREATE PROCEDURE privileges logs in and executes the following statement:

CREATE OR REPLACE PACKAGE plch_pkgIS g_stuff VARCHAR2 (10): = 'Stuff'; PROCEDURE show_stuff;END;/ CREATE OR REPLACE PACKAGE BODY plch_pkgIS PROCEDURE show_stuff IS BEGIN DBMS_OUTPUT.put_line (g_stuff); END;END;/ BEGIN plch_pkg.show_stuff;END;/ CREATE OR REPLACE PACKAGE plch_pkgIS g_new_stuff VARCHAR2 (10): =' NewStuff';END;/ BEGIN DBMS_OUTPUT.put_line (plch_pkg.g_new_stuff) END;/

Which of the following options correctly reflects what is displayed on my screen after executing the above two anonymous blocks?

(A)

Stuff

NewStuff

(B)

First "Stuff" is displayed on the screen. Then I will see this error:

ORA-04063: package body "HR.PLCH_PKG" has errors

ORA-06508: PL/SQL: could not find program unit being called: "HR.PLCH_PKG"

(C)

Stuff

Answer B

Tags: Two content screen permissions user answer statement login variable packet header Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL Shulou Information Shulou Technology Redmi Linux