---
title: "mysql distinct去重"
author: "myfreespace"
date: "2011-04-14T14:52:54Z"
tags: ["MySQL"]
categories: ["数据库"]
slug: "mysql-distinct"
draft: false
lastmod: "2011-07-21T15:50:24Z"
id: 1002992
url: "https://myfreespace.iteye.com/blog/1002992"
---

1.mysql的去重distinct一般都用在第一个字段上面，对于多个字段的处理可以结合count()函数

count(distinct Class.cla\_name) 

2.mysql中类似like的匹配函数，可以原子匹配find\_in\_set()