Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

How many tables can you join in v2r5?

1066


In general, how do you optimze any sql in teradata?

1039


What are some commonly used bteq scripts?

1005


What happens in a conflict? How do you handle that?

1042


Which is more efficient group by or distinct to find duplicates?

1083


Did you write stored procedures in teradata?

1128


What are the various etl tools in the market?

1069


In Teradata, what is the significance of UPSERT command?

1223


Define views in teradata with general syntax.

1021


What are types of partition primary index (ppi) in teradata?

1046


Highlight the points of differences between the database and user in Teradata.

1104


How to identify ppi columns?

1174


Can we collect statistics on table level?

1020


What are tpump utility limitations?

1118


How do you see a ddl for an existing table?

1016