Answers for "postgresql remove duplicate rows 2 columns"

SQL
0

postgresql remove duplicate rows 2 columns

DELETE FROM sf_table
WHERE id IN
    (SELECT id
    FROM 
        (SELECT id,
         ROW_NUMBER() OVER( PARTITION BY tosp, icd
        ORDER BY  id ) AS row_num
        FROM sf_table ) t
        WHERE t.row_num > 1 );
Posted by: Guest on June-10-2020

Code answers related to "postgresql remove duplicate rows 2 columns"

Code answers related to "SQL"

Browse Popular Code Answers by Language