MySQL的设置操作 [英] Set operation of MySQL

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

问题描述

MySQL可以使用Set操作intersect(∩)和except(-)吗?如果可以,请举例如果不能,那么操作是什么?

can MySQL use Set operation intersect(∩) and except(-)? if can,please give a example if can't, then what's the operation instead?

推荐答案

在 mysql 中使用 intersect 是可以的,但是你必须写得有点不同.这里有一个例子(以及这里一个很好的描述链接):>

It is possible to use intersect in mysql, but you have to write it a little differently. Here an example (and here a link to a nice description):

SELECT a.member_id, a.name
  FROM a INNER JOIN b
 USING (member_id, name)

你也可以在页面中找到一个except(减号)的例子

You can find an example for except (minus) in the page also

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

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