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
How do you set the session mode parameters in bteq?
What are the primary characteristics of the Teradata.
How do you see a ddl for an existing table?
What are the main components of teradata system?
Highlight the need for Performance Tuning.
Explain teradata architecture in detail with a diagram.
What are the functions involved in shared information architecture?
How teradata makes sure that there are no duplicate rows being inserted when its a set table?
What are the steps involved in the process flow of the sql statement through channel attached system?
What is a sparse index?
What is the difference between global temporary tables and volatile temporary tables?
There is a column with date in it. If I want to get just month how it can be done? Can I use sub string?
how many modules are there in telecome domain?how to explain the architecture?
Explain the term 'columns' related to relational database management system?
What is bteq utility in teradata?