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
Explain and compare pros and cons of snow flake schemas?
What are different table types used in teradata?
What are some commonly used bteq scripts?
What is difference between user and database in teradata?
How many sessions of MAX is PE capable of handling at a particular time?
What is the use of stored procedures in teradata?
What are the enhanced features in teradata v2r5 and v2r6?
If Fast Load Script fails and only the error tables are made available to you, then how will you restart?
What is the difference between teradata and oracle?
What type of indexing mechanism do we need to use for a typical data warehouse?
What is inner join and outer join?
Highlight the need for Performance Tuning.
Can you connect multiload from ab initio?
How do you do backup and recovery in teradata?
What are the uses of bynets in multi-node systems?