Skip to content
SQL

Delete Duplicates


Med hjälp av nestad query ( )

DELETE FROM MITT_TABELLNAMN

WHERE
id IN (
SELECT
id
FROM (
SELECT
id,
ROW_NUMBER() OVER (
PARTITION BY KOLUMN_NAMNET_SOM_E_DUBLETT
ORDER BY KOLUMN_NAMNET_SOM_E_DUBLETT) AS row_num
FROM
MITT_TABELLNAMN
) t
WHERE row_num > 1
);
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.