這個查詢給我錯誤,所以這個查詢有什麼問題?這個SQL查詢有什麼問題
SELECT recipes.recipeId as recipeId,
recipes.title as title,
recipes.cookingtime as cookingtime,
recipes.serving as serving,
schedule.catId as catId,
images.imagePath AS imagePath
FROM recipes
INNER JOIN schedule ON recipes.recipeId = schedule.recipeId
INNER JOIN images ON images.recipeId = recipes.recipeId
GROUP BY recipeId
WHERE schedule.day = 'saturday'
ORDER BY catId ASC
我認爲在查詢中group by的位置不正確。
雖然你能猜出你的答案(並有它由echo_Me確認),你應該總是包含錯誤信息你的問題。 –