Removing records from MyISAM table

Discussion in 'MySQL' started by arrisweb, Feb 24, 2010.

  1. #1
    Hello,

    I wonder if there is a better way to remove records from MyISAM table.
    Not just to check all records and delete.
    I have table with 80000 records and I want to remove first 50000 records.
     
    arrisweb, Feb 24, 2010 IP
  2. koko5

    koko5 Active Member

    Messages:
    394
    Likes Received:
    14
    Best Answers:
    1
    Trophy Points:
    70
    #2
    Hi, try this
    
    DELETE FROM TableName ORDER BY Desired_field ASC LIMIT 50000;
    
    Code (markup):
    Regards :)
     
    koko5, Feb 24, 2010 IP
    arrisweb likes this.
  3. arrisweb

    arrisweb Well-Known Member

    Messages:
    1,277
    Likes Received:
    48
    Best Answers:
    0
    Trophy Points:
    160
    #3
    thank you for quick reply, it works fine :)
     
    arrisweb, Feb 24, 2010 IP