mysql intersect

mysql

Solution

MySQL does not have an INTERSECT keyword. See this question and this one for suggestions about how to achieve what you're after.

Problem

I'm new to mysql so please be kind. I'm getting the following error for my script and im not sure whats wrong with it. ``` 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; ``` gives ``` #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 ```

Original source

Related problems