我是新來的mysql,請善待。我得到了我的腳本以下錯誤,我不知道它有什麼問題。mysql intersect
SELECT uoid
FROM mint
WHERE mint_id='6' and userid='3836'
INTERSECT
SELECT id as uoid
FROM cats
WHERE category='Health, Fitness'
ORDER BY 1;
給
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTERSECT SELECT id as uoid FROM cats WHERE category='Health, Fitness'' at line 4
這是因爲MySql沒有INTERSECT關鍵字。可能有趣:http://stackoverflow.com/questions/2621382/intersect-in-mysql。 – alexn
...和這一個:http://stackoverflow.com/q/2300322/306084 – pjmorse