inserted some duplicate records for testing purpose.
cust_id='oms1'
Deleting all duplicate rows
FROM temp GROUP
BY cust_id HAVING COUNT(*) > 1)
way.Here I craeted a table with distict records.Drop first one and rename
second one. )
efficient way to achieve the same.]
row_number()
OVER ( PARTITION BY cust_id ORDER BY cust_id ) AS rowcnt
> 1