Results 1 to 2 of 2

Thread: mysql query

  1. #1
    Join Date
    Jul 2013
    Posts
    3

    Unanswered: mysql query

    Hi All,
    Using procedure delete the duplicate record based on phone no(unique) by selecting with least count of each column.

    The requirement is
    For person a
    1st row has - 4 records
    2nd row has - 5 records
    3rd row has - 6 records
    4th row has - 7 records
    5th row has- 8 records
    6th row has - 9 records

    have attached the table as image format.
    I need to delete all rows except 6th one. since all the rows has least information of the person except the sixth.
    and then which has delete the duplicate record and store into new table. Kindly help.
    Attached Thumbnails Attached Thumbnails mysqlscript.JPG  

  2. #2
    Join Date
    Sep 2009
    Location
    San Sebastian, Spain
    Posts
    880
    I am not really sure about what you are asking here. Can you give an example based on your data. The image gives 6 records but yet you talk about rows with 4,5,6,7,8 and 9 records.
    Ronan Cashell
    Certified Oracle DBA/Certified MySQL Expert (DBA & Cluster DBA)
    http://www.it-iss.com
    Follow me on Twitter

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •