频道栏目
首页 > 资讯 > MySQL > 正文

题目7:MySQL----------DuplicateEmails

15-05-25        来源:[db:作者]  
收藏   我要投稿

Write a SQL query to find all duplicate emails in a table named Person.

+----+---------+
| Id | Email   |
+----+---------+
| 1  | a@b.com |
| 2  | c@d.com |
| 3  | a@b.com |
+----+---------+

For example, your query should return the following for the above table:

+---------+
| Email   |
+---------+
| a@b.com |
+---------+
题目解答:

# Write your MySQL query statement below
SELECT DISTINCT a.Email
FROM Person a JOIN Person b
ON (a.Email = b.Email)
WHERE a.Id <> b.Id


相关TAG标签
上一篇:UC浏览器收集并发送用户隐私数据分析报告
下一篇:HTTPS协议要比HTTP多用多少服务器资源
相关文章
图文推荐

关于我们 | 联系我们 | 广告服务 | 投资合作 | 版权申明 | 在线帮助 | 网站地图 | 作品发布 | Vip技术培训 | 举报中心

版权所有: 红黑联盟--致力于做实用的IT技术学习网站