Question { Mphasis, 14916 }
deference between & and &&
Answer
Both of these are substitution variable adn difference
between & and &&:
&--->the variable prefixed with an ampersand (&) to
prompt the user for a value.
eg:
SELECT employee_id, last_name, salary, department_id
FROM employees
WHERE employee_id = &employee_num ;
It should prompt the user to enter a value for employee_num
&&--->Mainly we used the double-ampersand (&&) if you want
to reuse the variable value without prompting the user each
time.
eg:SELECT employee_id, last_name, job_id, &&column_name
FROM employees
ORDER BY &column_name;
Here the user is asked to give the value for variable
column_name only once. The
value supplied by the user (department_id) is used both for
display and ordering of data.