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 you will check the version of teradata?

1220


What are the different design perspectives used in teradata?

1033


How many tables can you join in v2r5?

1115


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

1128


How to explain project Architecture and flow in teradata interviews?Can please anyone help on this? Am new to teradata.

4421


What is meant by a Virtual Disk?

1202


How to Extract data from multiple legacy systems?

1171


In Teradata, how do we Generate Sequence?

1088


Differentiate primary key and partition key?

1032


Give the sizes of SMALLINT, BYTEINT and INTEGER.

1207


What are the components used in smp and massively parallel processing (mpp) machines?

1093


how do you manage the production space. what are the proactive methods you can take ?

1978


What is the purpose of joins in teradata and what are the available join types?

1155


Can you connect multiload from ab initio?

1279


What are the newly developed features of Teradata?

1081