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 many tables can you join in v2r5?
In general, how do you optimze any sql in teradata?
What are some commonly used bteq scripts?
What happens in a conflict? How do you handle that?
Which is more efficient group by or distinct to find duplicates?
Did you write stored procedures in teradata?
What are the various etl tools in the market?
In Teradata, what is the significance of UPSERT command?
Define views in teradata with general syntax.
What are types of partition primary index (ppi) in teradata?
Highlight the points of differences between the database and user in Teradata.
How to identify ppi columns?
Can we collect statistics on table level?
What are tpump utility limitations?
How do you see a ddl for an existing table?