我想做一个左连接但mysql只是做一个内连接?我的查询有什么问题?
select av.*, ap.*
from tbl_available av
left join tbl_appointment ap
on av.avHours = ap.appointmenttime
where av.avCalendarId = 2
and (ap.calendarid = 2 or ap.calendarid= null)
and (ap.appointmentdate = "2012-10-01" or ap.appointmentdate = null)
and av.avDays = DayOfweek("2012-10-01")
order by avHours
mysql只给那些有相应预约的avHours
提前致谢!