即使没有数据也显示查询表

时间:2015-03-19 02:58:06

标签: mysql

我有一个查询,但每次运行它时,它只会显示包含所有信息的项目,显示等。

SELECT DISTINCTROW tblEvents.EventID,[ShowName]& " " &安培;格式([StartDate]," mm-yyyy")AS ShowNames,tblShowTypes.ShowType,tblStates.StateCode,Format([StartDate]," dd-mmm-yyyy")AS Start,格式([EndDate]," dd-mmm-yyyy")AS [End],tblInsideOutside.InsideOutside,tblHomeAway.HomeAway,tblShowCosts.BoothCost,tblComments.Comment FROM((((((((tbEEvents INNER JOIN tblShows ON tblEvents.ShowID = tblShows.ShowID)INNER JOIN tblShowTypes ON tblShows.ShowTypeID = tblShowTypes.ShowTypeID)INNER JOIN tblStates ON tblEvents.StateID = tblStates.StateID)INNER JOIN tblInsideOutside ON tblShows。 InsideOutsideID = tblInsideOutside.InsideOutsideID)INNER JOIN tblShowCosts ON tblEvents.EventID = tblShowCosts.EventID)INNER JOIN tblHomeAway ON tblShows.HomeAwayID = tblHomeAway.HomeAwayID)INNER JOIN tblComments ON tblShowCosts.EventID = tblComments.EventID;

1 个答案:

答案 0 :(得分:0)

正如其他人所说,请显示您的查询。话虽如此,从INNER JOIN更改为LEFT OUTER JOIN。同样,在不知道您的架构的情况下无法确定。