2 Day Developer > Using SQL > Retrieving Data With Queries > Using Bind Variables With t...
Using Bind Variables With the SQL Commands Page |
Previous |
Next |
You can use bind variables with the SQL Commands page to prompt for values when running a SQL statement, rather than supplying the value when the statement is created. Bind variables are prefixed with a colon. You can choose any name for the bind variable name, such as :b
, :bind_variable
, or :employee_id
. For example, you could enter and run the following statement in the SQL Commands page:
SELECT * FROM employees WHERE employee_id = :employee_id
When you run a statement with a bind variable in the SQL Commands page, a window opens prompting you for a value for the bind variable. After entering a value, click the Submit button. Note that you might need to configure your Web browser to allow the popup window to display.
For information about using bind variables with PL/SQL, see "Using Bind Variables With PL/SQL".