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 are the frequently used data types in teradata?
What is the maximum number of dml can be coded in a multiload script?
Hi, If anyone has TD 14 Basics dumps or study materials, please share. nirmaaal1991@gmail.com
In Teradata, what is the significance of UPSERT command?
Explain teradata utilities?
What are the uses of client software involved in teradata?
List the logical and conditional operators that are used with teradata along with their meanings?
What is the difference between fastload and multiload?
What are the multiload utility limitations?
Can you fastexport a field, which is primary key by putting equality on that key?
What is the difference between union and union all in teradata?
Hi send me the Teradata dumps to my id rajeshanantha@yahoo.co.in Thanks Rajesh. A
Highlight the need for Performance Tuning.
Highlight the differences between Primary Key and Primary Index.
List out all forms of LOCKS that are available in Teradata.