January 2012
Intermediate to advanced
542 pages
11h 28m
English
We have already discussed bind variables and parsing in the Using bind variables recipe in Chapter 4, Optimizing SQL Code. In this recipe, we will see another example, using the same principles applied to a PL/SQL procedure.
The following steps will demonstrate the bind variables using PL/SQL:
SH:
CONNECT sh@TESTDB/sh
CREATE FUNCTION CONDITIONAL_COLUMN_LEN(TABLE_NAME IN VARCHAR2, COLUMN_NAME IN VARCHAR2, COND_FIELD IN VARCHAR2, COND_VALUE IN VARCHAR2) RETURN NUMBER IS L_RESULT NUMBER := 0; L_STMT VARCHAR2(2000); BEGIN L_STMT := 'SELECT ...
Read now
Unlock full access