(Choose all that apply.)

Identify situations in which the DBMS_SQL package is the only applicable method of processing
dynamic SQL. (Choose all that apply.)

Identify situations in which the DBMS_SQL package is the only applicable method of processing
dynamic SQL. (Choose all that apply.)

A.
When a query returns multiple rows

B.
When a column name in a where clause is unknown at compile time.

C.
When the number ofcolumns selected in a query is not known until run time

D.
When a table needs to be created based on an existing table structure at run time

E.
When privileges need to be granted to a new user to access an existing schema at run time



Leave a Reply 11

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


piero

piero

b , c
changed opinion

alex

alex

From the documentation:
—-
The DBMS_SQL package can also be used to generate dynamic SQL in PL/SQL. In
most situations, NDS is easier to implement and performs better than DBMS_SQL.

However, there are limitations to Native Dynamic SQL that sometimes require the
use of DBMS SQL. In particular, there is no support in NDS for dynamic SQL
statements that have an unknown number of inputs or outputs. In addition, there are
some tasks that can only be performed using DBMS_SQL.

In certain situations, you must use native dynamic SQL instead of the DBMS_SQL
package:
– The dynamic SQL statement needs to retrieves rows into records.
– There is a need to use the SQL cursor attribute %FOUND, %ISOPEN, %NOTFOUND, or %ROWCOUNT after issuing a dynamic SQL statement that is an INSERT, UPDATE, DELETE, or single-row SELECT statement.

So answer should be: A, C

alex

alex

Sorry I was wrong. A is not correct, I must say only C is correct although I find it very strange to have only one option in a multi choice question.

alex

alex

So if I have to chose more that one let it be B and C.