In this chapter, you will learn about
• EXECUTE IMMEDIATE statements
• OPEN-FOR, FETCH, and CLOSE statements
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.
Now, consider a different type of PL/SQL application in which SQL statements are built on the fly, based on a set of parameters specified at runtime. For example, an application might need to build ...