ORA-01468: a predicate may reference only one outer-joined table

ORA-01468: a predicate may reference only one outer-joined table

Oracle PL/SQL error message: ORA-01468: a predicate may reference only one outer-joined table.

Cause:

A predicate in the WHERE clause has two columns from different tables with “(+)”.

Solution:

Change the WHERE clause so that each predicate has a maximum of one outer-join table.

Students table

STUDENT_IDFIRST_NAMELAST_NAME
1DanielSCOTT
2AnthonySIMMONS
3SophiaTHOMPSON
4EmilyPETERSON
5DavidDAWSON
6GabrielLEWIS

Orders table

ORDER_IDCOURSE_IDSTUDENT_ID
116
345
2156
2214

Example:

select s.student_id, s.first_name, s.last_name 
from students s, orders o 
where s.student_id(+) = o.student_id(+)
order by s.student_id;

Output:

ORA-01468: a predicate may reference only one outer-joined table

Correct:

select s.student_id, s.first_name, s.last_name 
from students s, orders o 
where s.student_id = o.student_id(+)
order by s.student_id;

Output:

STUDENT_IDFIRST_NAMELAST_NAME
1DanielSCOTT
2AnthonySIMMONS
3SophiaTHOMPSON
4EmilyPETERSON
5DavidDAWSON
6GabrielLEWIS