Your consulting company is currently migrating all its applications from using
DBMS_SQL to native dynamic SQL. To help ensure that the migration can be done piecemeal, you want to provide the ability to switch between the two different techniques so that legacy code can coexist with the newer native dynamic SQL.
When you need both the
DBMS_SQL package and native dynamic SQL, you can switch between them using the
DBMS_SQL.TO_CURSOR_NUMBER APIs. The
DBMS_SQL.TO_REFCURSOR API provides the ability to execute dynamic SQL using the
DBMS_SQL package and then convert the
DBMS_SQL cursor to a
REF CURSOR. The
DBMS_SQL.TO_CURSOR_NUMBER API allows for executing ...