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
How you will check the version of teradata?
What are the different design perspectives used in teradata?
How many tables can you join in v2r5?
Which is more efficient group by or distinct to find duplicates?
How to explain project Architecture and flow in teradata interviews?Can please anyone help on this? Am new to teradata.
What is meant by a Virtual Disk?
How to Extract data from multiple legacy systems?
In Teradata, how do we Generate Sequence?
Differentiate primary key and partition key?
Give the sizes of SMALLINT, BYTEINT and INTEGER.
What are the components used in smp and massively parallel processing (mpp) machines?
how do you manage the production space. what are the proactive methods you can take ?
What is the purpose of joins in teradata and what are the available join types?
Can you connect multiload from ab initio?
What are the newly developed features of Teradata?