EXPERT RESPONSE
With dynamic SQL, we have SQL that is not known until run time. The PLSQL engine does not know how many columns might be fetched, what tables will be accessed, what inputs are expected. You, the programmer, must do more work to deal with this.
You can use the DBMS_SQL package to run dynamic SQL or you can use EXECUTE IMMEDIATE. EXECUTE IMMEDIATE is a bit easier to code and a more recent implementation of what we used to use DBMS_SQL alone to do.
There's a good example that Oracle provides on its OTN site (technet.oracle.com) at the following link: http://technet.oracle.com/sample_code/tech/pl_sql/htdocs/ndsdemo.txt For More Information
|