我有以下 SQL 查询:
SELECT
C.Child_ID,
C.Child_Name AS Name,
C.Child_Surname AS Surname,
C.Birthday AS DOB,
C.Location,
C.Primary_Image,
U.Text AS MostRecentUpdate,
U.Update_Date,
S.End_Date
FROM Children as C, Sponsors as S, Updates as U
WHERE
S.User_ID=@UserID
AND C.Child_ID=S.Child_ID
AND C.Child_ID=U.Child_ID
AND U.Update_Date = (SELECT
MAX(Update_Date)
FROM Updates as U2
WHERE U2.Child_ID=S.Child_ID)
AND S.End_Date>GETDATE()
ORDER BY C.Child_Name ASC
其中选择了孩子的详细信息和孩子的最新更新(用于赞助网站)。问题是,如果孩子还没有任何更新(更新类似于 facebook 状态),则不会返回任何详细信息。
如果没有更新,是否有办法修改此查询以仅返回子详细信息?