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 / guest
Hope this will help,
DELETE FROM EMPLOYEE
WHERE (EMP_ID,EMP_NAME) IN
(SELECT EMP_ID,EMP_NAME FROM
(SELECT EMP_ID,EMP_NAME ,ROW_NUMBER() OVER (PARTITION BY
EMP_ID,EMP_NAME ORDER BY EMP_ID,EMP_NAME) AS FLG
FROM EMPLOYEE) A
WHERE
A.FLG<>1)
| Is This Answer Correct ? | 4 Yes | 10 No |
Post New Answer View All Answers
What is the difference between global temporary tables and volatile temporary tables?
How many tables can you join in v2r5?
How can bottlenecks be identified?
What is smp and mpp platforms?
What is a dimension table?
What are types of partition primary index (ppi) in teradata?
Why does varchar occupy 2 extra bytes?
What are the components provided on node?
What are the things to be considered while creating secondary index?
what is sysdba and sysdbc ? which has high priority ?
Backup Script was blocked then you are unable to archive the data. how do you analyze it and where do you identify ?
What are default access rights in teradata? What explicit right can be given to a user?
Highlight the points of differences between the database and user in Teradata.
List out all forms of LOCKS that are available in Teradata.
What is the difference between fastload and multiload?