Starting from Oracle8i one can use the "EXECUTE IMMEDIATE" statement to execute dynamic SQL and PL/SQL statements (statements created at run-time). Look at these examples. Note that the statements within quotes are NOT semicolon terminated:
One can also use the older DBMS_SQL package (V2.1 and above) to execute dynamic statements. Look at these examples:
More complex DBMS_SQL example using bind variables:
版权所有: IT货架- 内容来自互联网,仅供用于技术学习,请遵循相关法律法规. 京ICP备11030978号-1