Nej, du kan ikke bare erstatte ON
med USING
. Men du kan omskrive forespørgslen til at indeholde USING
klausul i joinforbindelser. Se korrekt syntaks nedenfor:
select e.employee_id,
e.last_name,
department_id, --Note there is no table prefix
d.department_name,
l.city,
location_id --Note there is no table prefix
from employees e
join departments d
using (department_id)
join locations l
using (location_id)
where e.manager_id = 149;