Name Null?

Examine the structure of the DEPARTMENTS table.

Name Null? Type
—————————– ———— ———-
DEPARTMENT_ID NOT NULL NUMBER(4)
DEPARTMENT_NAME NOT NULL VARCHAR2(30)
LOCATION_ID NUMBER(4)
View the Exhibit and examine the code that you plan to use for creating a package to obtain the
details of an employee using a host variable on the client side.
In SQL*Plus, you plan to use the following commands:
SQL> VARIABLE x REFCURSOR
SQL> EXECUTE emp_data.get_emp(195,:x)
SQL> PRINT x
Which statement is true about the above scenario?

Examine the structure of the DEPARTMENTS table.

Name Null? Type
—————————– ———— ———-
DEPARTMENT_ID NOT NULL NUMBER(4)
DEPARTMENT_NAME NOT NULL VARCHAR2(30)
LOCATION_ID NUMBER(4)
View the Exhibit and examine the code that you plan to use for creating a package to obtain the
details of an employee using a host variable on the client side.
In SQL*Plus, you plan to use the following commands:
SQL> VARIABLE x REFCURSOR
SQL> EXECUTE emp_data.get_emp(195,:x)
SQL> PRINT x
Which statement is true about the above scenario?

A.
The package executes successfully and passes the required data to the host variable.

B.
The package specification gives an error on compilation because cursor variable types cannot
be defined in the specification.

C.
The package specification gives an error on compilation because the cursor variable
parameter was specified before you defined it.

D.
The package executes successfully, but does not pass the required data to the host variable
because the cursor is closed before the PRINT statement runs.



Leave a Reply 1

Your email address will not be published. Required fields are marked *