Subject Re: [firebird-support] VIEW optimization
Author Ann Harrison
On Thu, Apr 7, 2016 at 3:41 PM, Ann Harrison <aharrison@...> wrote:
On Thu, Apr 7, 2016 at 2:27 PM, Gabor Boros gaborboros@... [firebird-support] <> wrote:
2016. 04. 07. 19:31 keltezéssel, 'Mark Rotteveel' mark@...
[firebird-support] írta:

Just in case you think Firebird should be able to ignore parts of an outer join,
let me disillusion you.

     select d.DepartmentName from Departments d
            left outer join Employees e on e.DeptID = d.DeptID

Suppose you have 10 Departments and 10 Employees, but all the
Employees have the same DeptID.  Then you should get the same
DepartmentName ten times.

The left outer join will return the nine unmatched Departments, returning
one DepartmentName for each unmatched Department.  The name of the
Department with 10 Employees will be returned 10 time.

Good luck,