sql >> Base de Datos >  >> RDS >> Oracle

Cláusula USING en Oracle 11g

No, no puedes simplemente reemplazar ON con USING . Pero puede reescribir la consulta para que contenga USING cláusula en uniones. Consulte la sintaxis correcta a continuación:

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;