我有这个:
SELECT
COUNT(resurs_id) AS 'antalLikes'
FROM kopplaResursLikesUsers
WHERE resurs_id = 19
UNION
SELECT user_id AS 'gillarJagEller'
FROM kopplaResursLikesUsers
WHERE user_id = 5
我认为输出将是:
antalLikes = 2
gillarJagEller = 5
但我得到的结果是:
antalLikes[0] = 2
antalLikes[1] = 5
任何想法为什么它完全忽略我的第二个“AS”声明?