Reputation: 145
SELECT d.deptname, d.deptlocation, e.empname
FROM payroll.employee e, payroll.department d
WHERE e.deptno(+) = d.deptno
ORDER BY d.deptname, e.empname;
What does the (+) mean? Is that mean from employee table deptno Can be null?
Upvotes: 1
Views: 450
Reputation: 341
WHERE e.deptno(+) = d.deptno
It means if e.deptno
is not condition it will get to the query whatever.
Upvotes: 0
Reputation: 51807
this is an old ORACLE-syntax to create OUTER JOIN
s. in your case, it means the same as
[...]
FROM
payroll.department d
LEFT OUTER JOIN
payroll.employee e
ON
e.deptno = d.deptno
[...]
as others said in the comments, it's not valid in MySQL.
Upvotes: 3