Why Use Dynamic SQL?

Published on by LakshmiSaahul,Dhana Royal

Why Use Dynamic SQL?

You need dynamic SQL in the following situations:

  • You want to execute a SQL data definition statement (such as CREATE), a data control statement (such as GRANT), or a session control statement (such as ALTER SESSION). Unlike INSERT, UPDATE, and DELETEstatements, these statements cannot be included directly in a PL/SQL program.
  • You want more flexibility. For example, you might want to pass the name of a schema object as a parameter to a procedure. You might want to build different search conditions for the WHERE clause of aSELECT statement.
  • You want to issue a que
Advertising
To be informed of the latest articles, subscribe:
Comment on this post