Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2004

    Unanswered: MYSQL multiple records

    Hi, could someone help me with multiple records?
    I have some table with multiple records, want to delete multiple records from this table by having unique records stay again in it.
    I need to do it by using a SQL query, NOT a PHP or other language script.
    I know the keyword distinct in MySQL, but it returns me back only this unique records, but i need to show the other part of records.
    Thanks for answer. Bonoman.

  2. #2
    Join Date
    Feb 2004
    In front of the computer
    Provided Answers: 54
    So you have a table that has rows that have duplicate values in some columns, but different values in other columns? If that is the case, you need to decide which of the rows you want to keep, and the syntax needed to isolate either the rows you want to either keep or delete.

    Once you've got that figured out, you should be able to put them together to create a DELETE statement that will do just what you want!

    Just FYI, this sounds suspiciously like an assignment. You probably want to talk this out in person with somebody in the lab sessions rather than just ask for a solution on the internet.


  3. #3
    Join Date
    Jan 2003
    Paris, France
    You can create a temporary table
    Export all distinct row in this table
    Delete data in your main table and re import data from the temporary table
    Olivier Miossec

Posting Permissions

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