SELECT p.pid, p.cid, p.pname, c1.name1, c2.name2
FROM product p
LEFT JOIN customer1 c1 ON p.cid = c1.cid
LEFT JOIN customer2 c2 ON p.cid = c2.cid
More Related Contents:
- Difference between RIGHT & LEFT JOIN vs RIGHT & LEFT OUTER JOIN in SQL [duplicate]
- What is the difference between “INNER JOIN” and “OUTER JOIN”?
- How can I do a FULL OUTER JOIN in MySQL?
- SQL update from one Table to another based on a ID match
- SQL join: selecting the last records in a one-to-many relationship
- SQL to LINQ with multiple join, count and left join
- Difference between left join and right join in SQL Server [duplicate]
- Oracle “(+)” Operator
- JOIN two SELECT statement results
- Are “from Table1 left join Table2” and “from Table2 right join Table1” interchangeable?
- Is it true that using INNER JOIN after any OUTER JOIN will essentially invalidate the effects of OUTER JOIN?
- Explain JOIN vs. LEFT JOIN and WHERE condition performance suggestion in more detail
- How do I UPDATE from a SELECT in SQL Server?
- Explicit vs implicit SQL joins
- Select rows which are not present in other table
- Does the join order matter in SQL?
- What is the difference between JOIN and UNION?
- Left Outer Join Not Working?
- Inner Join vs Natural Join vs USING clause: are there any advantages?
- Including null values in an Apache Spark Join
- How to kill a running SELECT statement
- Why postgres returns unordered data in select query, after updation of row?
- How do I convert a “legacy” left outer join statement in Oracle?
- MySQL: GROUP_CONCAT with LEFT JOIN
- Joining multiple tables in SQL
- What is the difference between a LATERAL JOIN and a subquery in PostgreSQL?
- sql sum data from multiple tables
- IN vs. JOIN with large rowsets
- SQL: Two select statements in one query
- SQL Inner Join On Null Values