Description:
Use the DEFINE command to create and assign a value to a variable.
Use the UNDEFINE command to remove a variable.
Examples:
Use the DEFINE command to create and assign a value to a variable.
Use the UNDEFINE command to remove a variable.
Examples:
DEFINE employee_num = 200
SELECT employee_id, last_name, salary
FROM employees
WHERE employee_id = &employee_num ;
UNDEFINE employee_num
The example creates a
substitution variable for an employee number by using the DEFINE command. At run time, this displays
the employee number, name and salary for that employee.
Because the variable is created using
the SQL Developer DEFINE command, the user is not
prompted to enter a value for the employee number. Instead, the defined
variable value is automatically substituted in the SELECT statement.
The EMPLOYEE_NUM substitution variable is
present in the session until the user undefines it or exits the SQL Developer session.
No comments :
Post a Comment