mysql 三表 left join
mysql 三表 left join。
·
mysql 三表 left join
left join(左联接) 返回包括左表中的所有记录和右表中联结字段相等的记录
https://blog.csdn.net/u010168781/article/details/120542993
Mysql中3表连接(good)
https://blog.csdn.net/qq_32334103/article/details/123842966
基表
第一种连接方式:A,B表连接时,A表作为基表,故A表中的数据全部显示,B表中userId为1,3,4时正常显示,为2时自动补null值
2、外连接:分为左外连接和右外连接
左连接A、B表结果包括A的全部记录和符合条件的B的记录。
11
select
(case when abc.type='boy' then '男孩'
when abc.type='girl' then '女孩'
end
) as sex,
concat('table_',abc.id) as devId
from student_table as abc;

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。
更多推荐
所有评论(0)