如何查询不同的值 [英] How do I query distinct values

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

问题描述

如何根据查询查询我得到的独特clubName?下面是演示sql查询的网站。



http://www.sqlfiddle.com/#!2/54be8b/6 [ ^ ]

How do I query that I get a distinct clubName based on my query? Below is the website to demo the sql query.

http://www.sqlfiddle.com/#!2/54be8b/6[^]

推荐答案

您的表格没有任何重复记录..



只有Clubname& ID相同但是姓氏&名字是不同的..所以你的查询将检索所有值..



如果你想检索组不同使用这个查询..



Your table have not any duplicate records ..

that have only Clubname & ID are same but Last Name & First Name are Different .. So your query will retrieve all values ..

if you want to retrieve group distinct use this query ..

select clubname,id,lastname,firstname from persons group by clubname







谢谢

AARIF SHAIKH




Thanks
AARIF SHAIKH


使用
Distinct 

Sql




顺便说一句,
,你的小提琴链接没有显示任何内容。



by the way, your fiddle link not showing anything.


这篇关于如何查询不同的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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