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
You can't unless the ROWID usage has been enabled on your system (and probablity is quite low). You can easily test it by trying to explain a SELECT ROWID FROM table;
Otherwise there are two possible ways.
Low number of duplicates:
SELECT all columns FROM table GROUP BY all columns HAVING COUNT(*) > 1;DELETE FROM tab WHERE EXISTS (SELECT * FROM newtab WHERE...)INSERT INTO tab SELECT * FROM newtabHigh number of duplicates:
SELECT DISTINCT * or copy to a SET TABLE to get rid of the duplicates and then re-INSERT back