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
Why is the case expression used in teradata?
Explain the parallel data extension in teradata?
what are the day to day activities of teradata DBA ?
Explain the advantages of partitioned primary index in a query?
tomorrow i have interview in infosys.can someone pour any suggestions or any interview questions. thank you
What is meant by a Virtual Disk?
What are the different table types that are supported by teradata?
What is meant by a dispatcher?
Highlight the differences between Primary Key and Primary Index.
What do high confidence, low confidence and no confidence mean in explain plan?
In a table can we use primary key in one column and in another column both unique and not null constrains.if yes how?
How do you see a ddl for an existing table?
Explain PDE.
How will you solve the problem that occurs during update?
Can we collect statistics on multiple columns?