Home >Database >Mysql Tutorial >MySql查询去重操作_MySQL

MySql查询去重操作_MySQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-01 13:31:181463browse

bitsCN.com

MySql查询去重操作

 

QString strSql = QString("SELECT DISTINCT BodyRegions FROM imagedicom WHERE PatientID = '%1'").arg(imageDicomPatientID);

 

 

其实mysql的或者SQL Server的去重操作很简单的,就是关键字:

 

DISTINCT。

 

根据相关要求还可以采用group by 排序或者构建一个集合来

 

显示所需要的内容,单个属性列直接使用DISTINCT自动排序。

 

bitsCN.com
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn