我有三个表,如下面的屏幕截图所示:
但是当我想执行以下查询时,我没有得到任何结果,即使所有三个表中都有数据:
这是生成的代码:
SELECT Clients.ClientID, Clients.FirstName, Clients.Surname, Clients.Internal, Clients.Organisation, Clients.LandlineNo, Clients.MobileNo, Clients.Address1, Clients.Town,
Clients.Postcode, Clients.Email, Clients.NHS, Clients.PurchaseOrderNumber, Bookings.Date, Bookings.Timebegan, Bookings.Timefinished, Bookings.Price,
Bookings.Repeats, Bookings.Rweeks, Bookings.Rdays, Bookings.Rmonths, Bookings.Occurrences, Rooms.Roomname
FROM Clients INNER JOIN
Bookings ON Clients.ClientID = Bookings.ClientID INNER JOIN
Rooms ON Bookings.RoomID = Rooms.RoomID