17

Native Dynamic SQL

Generally, PL/SQL applications perform a specific task and manipulate a static set of tables. For example, a stored procedure might accept a student ID and return the student’s first and last names. In such a procedure, a SELECT statement is known in advance and is compiled as part of the procedure. Such SELECT statements are called static because they do not change from execution to execution.

Consider a different type of PL/SQL application where SQL statements are built on the fly, based on a set of parameters specified at runtime. For example, an application might need to build various reports based on SQL statements ...

Get Oracle PL/SQL by Example, 6th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.