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

What is the difference between global temporary tables and volatile temporary tables?

1100


How many tables can you join in v2r5?

1020


How can bottlenecks be identified?

973


What is smp and mpp platforms?

928


What is a dimension table?

1002


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

1018


Why does varchar occupy 2 extra bytes?

1134


What are the components provided on node?

998


What are the things to be considered while creating secondary index?

1056


what is sysdba and sysdbc ? which has high priority ?

3787


Backup Script was blocked then you are unable to archive the data. how do you analyze it and where do you identify ?

1911


What are default access rights in teradata? What explicit right can be given to a user?

1078


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

1062


List out all forms of LOCKS that are available in Teradata.

933


What is the difference between fastload and multiload?

1316