-1
我的MySQL查詢是相當複雜的,我想從它如何刪除我在下面複雜的MySQL查詢空列
SELECT NamazTiming.FajarZamat,MasjidMaster.MasjidID_PK,MasjidMaster.MasjidName,MasjidMaster.Longitude,MasjidMaster.Latitude,MasjidMaster.Address,
SQRT(POW(69.1 * (MasjidMaster.Latitude - 19.8) , 2) + POW(69.1 * (75.4- MasjidMaster.Longitude) * COS(MasjidMaster.Latitude/57.3) , 2)) AS distance ,CityMaster.CityName
FROM MasjidMaster
LEFT JOIN CityMaster
ON MasjidMaster.CityID_FK = CityMaster.CityID_PK
LEFT JOIN NamazTiming
ON MasjidMaster.MasjidID_PK = NamazTiming.MasjidID_FK
HAVING distance < 10
ORDER BY NamazTiming.FajarZamat
的空列刪除空列NamazTiming.FajarZamat
的
您既可以從選擇列表中刪除列,也可以用'IFNULL(ColumnName,'defaultValue')'語句包裝這些列。 –
「刪除空列」使得值不爲空或「刪除空列」,如「不返回列____爲空的記錄」一樣? –