Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

sql select duplicates based on two columns

select s.id, t.* 
from [stuff] s
join (
    select name, city, count(*) as qty
    from [stuff]
    group by name, city
    having count(*) > 1
) t on s.name = t.name and s.city = t.city
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #sql #select #duplicates #based #columns
ADD COMMENT
Topic
Name
9+1 =