-2
   select count(distinct (mobile)) from number_data where value = 'A_HNI';

   count(distinct (mobile)) = 5046082 



  select count(mobile) from number_data where value = 'A_HNI';

  count(mobile) = 9658150

There are 4612068 duplicates of mobile numbers in value = 'A_HNI'. I want to delete the duplicates and keep the original . The table has no primary key nor indexing . I can't assign a primary key but indexing is possible . The table is as follows :

Field Type Null Key Default Extra

title | varchar(255) | YES | | NULL | |

name | varchar(255) | YES | | NULL | |

age | varchar(255) | YES | | NULL | |

pincode | varchar(255) | YES | | NULL | |

city | varchar(255) | YES | | NULL | |

state | varchar(255) | YES | | NULL | |

mobile | varchar(255) | YES | | NULL | |

source | varchar(255) | YES | | NULL | |

value | varchar(255) | YES | | NULL | |

dnd | varchar(255) | YES | | NULL | |

msc | varchar(255) | YES | | NULL | |

operator | varchar(255) | YES | | NULL | |

1 Answers1

1

Get the Distinct value from your table ,create a new table with it then delete the old table For reference you can check this page Remove Duplicate Value

You can also refer this stack answerenter link description here

Community
  • 1
  • 1
Domain
  • 11,562
  • 3
  • 23
  • 44
  • I have multiple clauses example where value = 'A_HNI' , where value = 'a' , where value = 'b'. so i have to create separate table for each and then combine them ?? – It Insign Technology Sep 06 '14 at 06:01