mysql相交 [英] mysql intersect

查看:34
本文介绍了mysql相交的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是mysql的新手,所以请客气.我的脚本出现以下错误,不确定该怎么办.

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;

给予

#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关键字.参见此问题此问题获取有关如何实现自己的目标的建议.

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

这篇关于mysql相交的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆