One of the nicest things about NDS is its simplicity. Unlike DBMS_SQL, which has dozens of programs and lots of rules to follow, NDS has been integrated into the PL/SQL language by adding one new statement, EXECUTE IMMEDIATE, which executes a specified SQL statement immediately, and by enhancing the existing OPEN FOR statement, which allows you to perform multiple-row dynamic queries.
The EXECUTE IMMEDIATE and OPEN FOR statements will not be directly accessible from Oracle Forms Builder and Oracle Reports Builder until the PL/SQL version in those tools is upgraded to at least Oracle8i Database. For earlier versions, you will need to create stored programs that hide calls to these constructs; you will then be able to execute those stored programs from within your client-side PL/SQL code.
The EXECUTE IMMEDIATE Statement
Use EXECUTE IMMEDIATE to execute (immediately!) the specified SQL statement. Here is the syntax of this statement:
record}] [USING [IN | OUT | IN OUT]
bind_argument[, [IN | OUT | IN OUT]
Is a string expression containing the SQL statement or PL/SQL block.
Is a variable that receives a column value returned by a query.
Is a record based on a user-defined TYPE or %ROWTYPE that receives an entire row returned by a query.
Is an expression whose value is passed to the SQL statement or PL/SQL block, or an identifier ...