数据湖探索 DLI-左外连接:示例

时间:2024-07-01 21:07:18

示例

左外连接时利用student_info表中的courseId与course_info中的courseId进行匹配,返回已经选课的学生姓名及所选的课程名称,没有匹配值的右表记录将返回NULL。

1
2
SELECT student_info.name, course_info.courseName FROM student_info
  LEFT OUTER JOIN course_info ON (student_info.courseId = course_info.courseId);
support.huaweicloud.com/sqlreference-dli/dli_08_0167.html