A bind variable is a variable within a SQL statement that has to be replaced by a valid value on the successful execution of the statement. This value can be referenced into the PL/SQL block. Bind variable is always preceded by a colon (:), as shown in the following code:
Declare
v_emp_age_number;
Begin
Select emp_age into :v_emp_age from t_employee whereemp_code=121;
End;
In the preceding code, v_emp_age is a bind variable.
Declare
v_emp_age_number;
Begin
Select emp_age into :v_emp_age from t_employee whereemp_code=121;
End;
In the preceding code, v_emp_age is a bind variable.
No comments:
Post a Comment