No, non puoi semplicemente sostituire ON
con USING
. Ma puoi riscrivere la query per contenere USING
clausola in join. Vedi la sintassi corretta di seguito:
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;