0
ServiceID ServiceName
1 Cleaning
2 Painting
3 Driving
4 Cooking
表:現役軍人:
ServiceMemberID MemberID ServiceID
1 10 3
查詢:
SELECT s.ServiceName, sm.MemberID
FROM Services s
JOIN ServiceMembers sm ON s.ServiceID = sm.ServiceID
WHERE sm.MemberID = 10
退貨:
Driving 10
問題: 如何連接表,這樣我就可以得到以下的TSQL:
Cleaning NULL
Painting NULL
Driving 10
Cooking NULL
在此先感謝。
+1。你太快了:) – a1ex07 2011-02-06 23:50:55