O'Reilly logo

Oracle Database 12c The Complete Reference by Bob Bryla, Kevin Loney

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

image

CHAPTER36Using Native Dynamic SQL and DBMS_SQL

You can use native dynamic SQL to create general-purpose procedures and to execute DDL commands within PL/SQL. You can use dynamic SQL to execute SQL commands that are built at run time rather than at program-creation time within stored procedural objects (such as packages) and in anonymous PL/SQL blocks. For example, you can create procedures that create tables, that take table names as input parameters, or that take WHERE clauses as input parameters.

Using EXECUTE IMMEDIATE

The script in the following example creates a procedure called ANYSTRING. The ANYSTRING procedure has a single input variable: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required