我有 2 张桌子,Facility 和 Reservation 桌子。
设施表包含,
- 设施ID
- 类型
- 姓名
- 可用性
预订表,
- ID
- 会员ID
- 设施ID
- 登记日期
- 登记时间
这是我的查询,它只返回保留的详细信息。如何进行查询以返回那些未保留的设施详细信息?
SELECT Facility.[Facility Name], Facility.[Facility Type]
FROM Facility INNER JOIN Reservation on Facility.FacilityID = Reservation.FacilityID
WHERE Reservation.FacilityID = (
SELECT FacilityID
FROM Reservation
WHERE MemberID = '" & txtMemberID.Text & "'
AND [Check-in date] ='" & lstDate.SelectedItem.ToString & "')