View Single Post
Join Date: Apr 2008
Posts: 293
Reputation: Aamit has a little shameless behaviour in the past 
Solved Threads: 11
Aamit Aamit is offline Offline
Posting Whiz in Training

Re: Remov duplicates from array

 
0
  #3
Dec 5th, 2008
There is way to remove duplicate data or row like...
Step 1: Move the non duplicates (unique tuples) into a temporary table
  1. CREATE TABLE new_table AS
  2. SELECT * FROM old_table WHERE 1 GROUP BY [COLUMN TO remove duplicates BY];

Step 2: delete delete the old table
  1. DROP TABLE old_table;

Step 3: rename the new_table to the name of the old_table
  1. RENAME TABLE new_table TO old_table;
Reply With Quote