MySQL 左关联查询中两个以上数据表查询时,怎么得到唯一匹配的数据

WBOY
Release: 2016-06-13 13:31:40
Original
1503 people have browsed it

MySQL 左关联查询中两个以上数据表查询时,如何得到唯一匹配的数据
各位高手:
  我在使用左关联查询时,要涉及到两个以上的数据表,虽然可以查询出数据,但是却出现多个匹配结果的情况,就好像是使用了普通的关联查询一样,请高手指教指教,不胜感激,谢谢了。

------解决方案--------------------
select *
from a left join b on a.id=b.id 
 left c on a.id=c.id
------解决方案--------------------
需要在后面加个where条件
------解决方案--------------------
left join ON条件
还有 where
------解决方案--------------------
ID 数据类型必须匹配

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!