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 / tdguy

creating a new table would be the best option, if all the
field values are same, as far as i know.
CREATE NEW_TABLE AS OLD_TABLE WITH NO DATA;
INSERT INTO NEW_TABLE
SELECT COLUMN1, COLUMN2,COLUMN3 FROM OLD_TABLE
QUALIFY ROW_NUMBER() OVER
(PARTITION BY COLUMN1, COLUMN2,COLUMN3
ORDER BY COLUMN1, COLUMN2,COLUMN3 ASC ) = 1;
DROP TABLE OLD_TABLE;
RENAME NEW_TABLE TO OLD_TABLE;

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is meant by a Clique?

1114


What are the functions of a Parser?

1187


What are the string manipulation operators and functions associated with teradata?

1147


Explain the advantages of partitioned primary index in a query?

1070


What is logical data model?

1260


What is the use of teradata system software?

1087


What are the various indexes in teradata? How to use them? Why are they preferred?

1107


Explain the parallel data extension in teradata?

1151


how can we analyze the locks ?

2192


What is a level of granularity of a fact table?

1219


Let us say there is a file that consists of 100 records out of which we need to skip the first and the last 20 records. What will the code snippet?

1257


What is the basic syntax for teradata select statement?

1093


How teradata makes sure that there are no duplicate rows being inserted when its a set table?

1022


What are the available primary index types in teradata.

1078


How many codd's rules are satisfied by teradata database?

1149