Jesse Schutt 1 minute read
January 20, 2020

Checking for Duplicate Values in a SQL Table

Today I found myself needing to know if a particular column held unique values.

First off I checked if there was a unique constraint on the column. In this case there wasn't. If it was present I would have known there were no duplicates.

However, this simple query returned all the rows with duplicates:

The SQL Query