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 of columns 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
Confirming correct answer is BC.
Reference:
https://docs.oracle.com/cd/E11882_01/appdev.112/e25519/dynamic.htm#LNPLS01108
“You must use the DBMS_SQL package to run a dynamic SQL statement when you do not know either of these until run time:
SELECT list
What placeholders in a SELECT or DML statement must be bound”