Parameters |
|
You can use parameters in your SQL. Using parameters you can easially create reusable statements that prompt for values or take values from the worksheet.
There are two types of parameters or variables:
Note that you can use the following commands to define and prompt for substitution variables:
More examples:
select * from emp where empno = :A15;
accept myempno prompt 'Enter an employee
number:';
select * from emp where empno = &myempno;
define mydeptno = 20;
accept mydeptno prompt
'Enter a department number:';
select * from emp where deptno =
&deptno;
select * from emp where ename = :Sheet2!D12;
select * from emp where ename = '&myename';
See also: