Write a single SQL to delete duplicate records from the a
single table based on a column value. I need only Unique
records at the end of the Query.
Answer Posted / tdguy
creating a new table would be the best option, if all the
field values are same, as far as i know.
CREATE NEW_TABLE AS OLD_TABLE WITH NO DATA;
INSERT INTO NEW_TABLE
SELECT COLUMN1, COLUMN2,COLUMN3 FROM OLD_TABLE
QUALIFY ROW_NUMBER() OVER
(PARTITION BY COLUMN1, COLUMN2,COLUMN3
ORDER BY COLUMN1, COLUMN2,COLUMN3 ASC ) = 1;
DROP TABLE OLD_TABLE;
RENAME NEW_TABLE TO OLD_TABLE;
| Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
Difference between multiload and tpump?
My table got locked during mload due to a failed job. What do I do to perform other operations on it?
What do you mean by teradata intellicloud?
What is meant by a Channel Driver?
What are the things to be considered while creating secondary index?
What are the various indexes in teradata?
How to load specific no.of records using bteq, or fastload,or multiload
In Teradata, how do we Generate Sequence?
What are teradata utilities?
What happens in a conflict? How do you handle that?
What are the design features involved in teradata?
Explain the types of join supports by teradata?
What are the steps to create a data model?
What type of indexing mechanism do we need to use for a typical data warehouse?
Is multi insert ansi standard?