Combining SQL outer joins with inner joins

For the occasions where You really don't want to write explicit sub-queries

When You have 3 tables in an SQL query, and You need all records from table1 t1, but records from table2 t2 and table3 t3 only if there is a record on both tables t2 and t3, You have some options: Write all outer joins with a WHERE clauses select t1.field1, t2.field2, t3.field3 from table1 t1 left outer join table2 t2 on t1.field1 = t2.field1 left outer join table3 t3 on t2. [Read More]
sql