我的github
SELECT *
FROM table1
LEFT JOIN table2
ON table1.id = table2.id
LIMIT 1;

参考:https://geek-docs.com/mysql/mysql-ask-answer/75_mysql_left_join_only_first_row.html

分组再加limit:left join右表记录不唯一。

参考2:https://blog.csdn.net/u010089432/article/details/52165026

 

参考3:http://www.mobiletrain.org/about/BBS/257113.html

 参考4:...

posted on 2024-03-15 15:43  XiaoNiuFeiTian  阅读(301)  评论(0编辑  收藏  举报