Editor

Discussion in 'Databases' started by BlueEew, Feb 24, 2008.

  1. #1
    Hello. I have an SQL database that needs editing. I have to delete millions of lines from it.

    Whats the quickets way to do this, is there a way to delete from line X to line Y etc?

    Thanks,
    BlueEew.
     
    BlueEew, Feb 24, 2008 IP
  2. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #2
    If there is an index that increments, you can run a simple delete command.

    Something like:
    DELETE FROM my_table WHERE id > '1200' AND id < '240000';

    If you don't care what the increment is on, you should repair the table afterwards to clear out all the extra overhead.
     
    jestep, Feb 27, 2008 IP
  3. BlueEew

    BlueEew Well-Known Member

    Messages:
    2,434
    Likes Received:
    79
    Best Answers:
    1
    Trophy Points:
    150
    #3
    Luckly they we're all needed to be replaced, so I used a simple line replacment and it worked. :)
     
    BlueEew, Feb 28, 2008 IP