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 / ankal

Hi guys,
As per my knowledge i am expecting the following ans.

1.If u want delete duplicates at runtime means
output time it shows unique values but not delete
from table.
The following query.

=> Select [all columns] from tablename group by [all columns];

(OR)

2.If u want delete duplicate values from total table.
The following query.
The table having duplicates means it is multiset table so,

=> create set table nodup_table as dup_table with data;
If u want the table name as same do like this.
=> Next just drop table dup_table;
=> Finally rename table nodup_table to dup_table;

Is This Answer Correct ?    1 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a level of granularity of a fact table?

637


What are the advantages of teradata?

594


What is basic teradata query language?

630


What are teradata utilities?

582


What is meant by a node?

612






What is dimensional modeling?

587


Define views in teradata with general syntax.

566


Describe primary index in teradata?

581


Give a justifiable reason why Multi-load supports NUSI instead of USI.

670


What are the different table types supported by teradata?

526


What is logical data model?

634


How do you create tables? Exact syntax, and create profiles, users in teradata?

551


What is spool space and when running a job if it reaches the maximum spool space how you solve the problem?

650


How to Extract data from multiple legacy systems?

570


What do you mean by ttu in teradata?

567