×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: SQL
Posted by: Marcus Hamilton
Added: Sep 28, 2017 12:47 PM
Views: 2
Tags: sql
Code searches on <column_name> column for the duplicates; good for unique key requirement searches
  1. SELECT column_name, COUNT(column_name)
  2. FROM TABLE
  3. GROUP BY column_name
  4. HAVING COUNT (column_name) > 1;
  5.  
  6.