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?
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?
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.
WHERE e.deptno(+) = d.deptno It means if e.deptno is not condition it will get to the query whatever.