How to do a FULL OUTER JOIN in SQLite?

Yes. See the Join (SQL) > Outer join > Full outer join article on Wikipedia. SELECT employee.*, department.* FROM employee LEFT JOIN department ON employee.DepartmentID = department.DepartmentID UNION ALL SELECT employee.*, department.* FROM department LEFT JOIN employee ON employee.DepartmentID = department.DepartmentID WHERE employee.DepartmentID IS NULL

How to do a full outer join in Linq?

I think I have the answer here, which is not as elegant as I’d hoped, but it should do the trick: var studentIDs = StudentClasses.Select(sc => sc.StudentID) .Union(StudentTeachers.Select(st => st.StudentID); //.Distinct(); — Distinct not necessary after Union var q = from id in studentIDs join sc in StudentClasses on id equals sc.StudentID into jsc from … Read more

FULL OUTER JOIN with SQLite

Yes, see the example on Wikipedia. SELECT employee.*, department.* FROM employee LEFT JOIN department ON employee.DepartmentID = department.DepartmentID UNION ALL SELECT employee.*, department.* FROM department LEFT JOIN employee ON employee.DepartmentID = department.DepartmentID WHERE employee.DepartmentID IS NULL

LINQ – Full Outer Join

Update 1: providing a truly generalized extension method FullOuterJoin Update 2: optionally accepting a custom IEqualityComparer for the key type Update 3: this implementation has recently become part of MoreLinq – Thanks guys! Edit Added FullOuterGroupJoin (ideone). I reused the GetOuter<> implementation, making this a fraction less performant than it could be, but I’m aiming … Read more

SQL Server: What is the difference between CROSS JOIN and FULL OUTER JOIN?

A cross join produces a cartesian product between the two tables, returning all possible combinations of all rows. It has no on clause because you’re just joining everything to everything. A full outer join is a combination of a left outer and right outer join. It returns all rows in both tables that match the … Read more