Can we delete duplicate records from a multiset table in teradata without using intermediate table.
Suppose we have 2 rows with values 1, 2, 3 and 1, 2, 3 in my mu
---Without creating intermediate table
delete FROM ORGINAL_TABLE WHERE (COL1, 2) in (select COL1, count() from ORGINAL_TABLE GROUP BY 1 HAVING COUNT() >1 ) and DUPLICATE_BASED_COL >1; -------Delete one row(keep it)
If you have duplicates and want to delete one row, then we need to use the last line in the sql, if we want to delete both rows than, ignore the condition.