文件名称:多表联结查询—左外联结-DB2 SQLSERVER 的SQL规范化
文件大小:6.53MB
文件格式:PPT
更新时间:2024-05-15 13:24:05
DB2 SQLSERVER 规范
多表联结查询—左外联结 StudentsID CourseID Score 1 2 2 3 001 001 002 002 97 89 67 76 3 003 81 Score SName 梅超风 陈玄风 陆乘风 曲灵风 SCode 1 2 3 4 Stundents 查询结果 SName 梅超风 陈玄风 陈玄风 陆乘风 CourseID Score 001 001 002 002 97 89 67 76 陆乘风 003 81 曲灵风 NULL NULL SELECT S.SName,C.CourseID,C.Score From Students AS S LEFT JOIN Score AS C ON C.StudentID = S.SCode 猜一猜:这样写,返回的查询结果是一样的吗? SELECT S.SName,C.CourseID,C.Score From Score AS C LEFT JOIN Students AS S ON C.StudentID = S.SCode