Variables

Values used in the various SELECT statements that we have seen thus far in this book were fixed, which means that the value was placed in the SELECT statement at the time it was written. It cannot be changed unless the SELECT statement is modified. In some cases, it may be advantageous to be able to enter a value into the SELECT statement at runtime. For example, if an argument used in a SELECT statement can be specified at runtime, it would be possible to obtain different results using the same SELECT statement. A report that displays a list of employee tool purchases can display the tools for different employees if the target employee’s payroll number can be added at runtime. Fortunately, Oracle provides a tool called a substitution ...

Get Oracle SQL and PL/SQL Handbook: A Guide for Data Administrators, Developers, and Business Analysts 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.