user2786596
user2786596

Reputation: 145

MySQL (+), the meaning?

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

Answers (2)

WHERE e.deptno(+) = d.deptno It means if e.deptno is not condition it will get to the query whatever.

Upvotes: 0

oezi
oezi

Reputation: 51807

this is an old ORACLE-syntax to create OUTER JOINs. 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

Related Questions