Bind variable

From Oracle FAQ
Jump to: navigation, search

A bind variable is a place-holder variable in a SQL statement that must be replaced with a valid value (or address of a value) before the statement can successfully execute.

For example,


At runtime the program will provide a value for :EMPNO_BIND_VAR before executing the statement.

Capturing bind variables[edit]

Starting from Oracle 10g, bind variables are periodically captured in the v$sql_bind_capture and dba_hist_sqlbind views (keep in mind a Diagnostics Pack license is required for accessing dba_hist_* views).

Bind variables are captured either when a query is hard parsed; or if the last capture was _cursor_bind_capture_interval seconds ago (default 900).

Glossary of Terms
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z #