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
What is the difference between teradata and oracle?
Hi Friends, Please send me Teradata Materials for certifications Thanks in advance !!
Hi, If anyone has TD 14 Basics dumps or study materials, please share. nirmaaal1991@gmail.com
What is database exceptions in teradata?
Highlight the need for Performance Tuning.
Describe the between keyword in teradata?
What is collect statistics?
What is the meaning of Caching in Teradata?
Describe primary index in teradata?
Explain the advantages of partitioned primary index in a query?
Write a program to show the parser component used in teradata?
i learn teradata,it is so intersting,now i want teradata certifications ,so any 1 help me to get teradata certifications TD 12 ? email:kdcrazyy@gmail.com
How is MLOAD Client System restarted after execution?
Highlight the limitations of TPUMP Utility.
My table got locked during mload due to a failed job. What do I do to perform other operations on it?