Oracle

Using the && Substitution variable

Figo Kim 2006. 8. 29. 00:12


UNDEFINE employee_num

Use the double ampersand(&&) if you wantto reuse the ariable value without prompting the user each time:


SELECT employee_id, last_name, job_id, &&column_name 
FROM employees
ORDER BY &column_name

Use DEFINE command to create and assign a value to a variable

Use UNDEFINE  command to remove a variable

DEFINE employee_num = 200

SELECT employee_id,last_name, salary, department_id
FROM employees
WHERE employee_id = &employee_num;