DELETE FROM tblemployee
WHERE user_id IN
(SELECT user_id
FROM
(SELECT user_id, name,
ROW_NUMBER() OVER( PARTITION BY "name"
ORDER BY user_id ) AS row_num
FROM tblemployee ) t
WHERE t.row_num > 1 );
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter