查询多个表的SQL SELECT语句
<p>如何获取来自customers1和customers2的所有产品(包括他们的客户名称)?</p>
<pre class="brush:php;toolbar:false;">customer1 table
cid name1
1 john
2 joe
customer2 table
cid name2
p1 sandy
p2 linda
product table
pid cid pname
1 1 phone
2 2 pencil
3 p1 pen
4 p2 paper</pre>
<p>结果应该是这样的</p>
<pre class="brush:php;toolbar:false;">pid cid pname name1 name2
1 1 phone john NULL
2 2 pencil joe NULL
3 p1 pen NULL sandy
4 p2 paper NULL linda</pre></p>