Native Dynamic SQL (NDS) began replacing the DBMS_SQL package in Oracle 9i. As of Oracle 11g, NDS has replaced all but one type of dynamic statement. Clearly, NDS is the future of dynamic SQL in the Oracle database.
While Oracle’s product management would prefer we discuss current release technology, we understand that some firms delay upgrades for some time. We also know that a lot of older DBMS_SQL code is deployed. Therefore, we focus here on NDS and cover some of the features of the DBMS_SQL package.
This chapter provides working examples of dynamic statements without bind variables and dynamic statements with bind variables for both NDS and the DBMS_SQL package.
Dynamic SQL allows you to make your programs flexible. ...