1
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?

peterm
  • 91,357
  • 15
  • 148
  • 157
user2786596
  • 135
  • 2
  • 5
  • 10

2 Answers2

3

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.

oezi
  • 51,017
  • 10
  • 98
  • 115
0

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

4b0
  • 21,981
  • 30
  • 95
  • 142