Pregunta de entrevista de SCAN Health Plan

How to remove duplicate records

Respuestas de entrevistas

Anónimo

25 jul 2015

Use CTE.

1

Anónimo

28 ene 2016

or to clarify duplicates into a staging table when you are taking a subset of all the fields and you know what specific fields you are after, INSERT INTO > (>) SELECT > FROM (>) GROUP BY > having count(*)>1 and to add only those that are not duplicates INSERT INTO > (>) SELECT > FROM >) T GROUP BY > having count(*)=1