Mysql find duplicate values in field


/ Published in: MySQL
Save to your folder(s)

Mysql find duplicate values in field


Copy this code and paste it in your HTML
  1. SELECT my_column, COUNT(*) as count
  2. FROM my_table
  3. GROUP BY my_column
  4. HAVING COUNT(*) > 1

URL: http://snippets.khromov.se/check-if-column-in-mysql-table-has-duplicate-values/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.