1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Rep Power

    I'm pretty new at MySQL so any help would be appreciated

    To delete from a table I use this:

    mysql> DELETE FROM table
    -> WHERE (uid = "1");

    Now lets say I wanted to delete from uid = 1 till uid = 100. How would I do that?

    Thanks for your time!

  2. #2
  3. No Profile Picture
    Apprentice Deity
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 1999
    Niagara Falls (On the wrong side of the gorge)
    Rep Power
    For this particular query you could use:

    delete from table where uid<101;

    if you want to delete in the middle:

    delete from table where uid between 1 and 100;

    Note: with between the delimiters are inclusive.

Similar Threads

  1. new to PHP-MySQL, deleting entries from database
    By gyppo100 in forum MySQL Help
    Replies: 4
    Last Post: February 1st, 2004, 11:37 AM
  2. deleting entries from mysql
    By jackass in forum PHP Development
    Replies: 4
    Last Post: November 14th, 2003, 12:18 PM
  3. Set autoindex when deleting entries
    By wizer in forum MySQL Help
    Replies: 0
    Last Post: October 19th, 2003, 05:10 AM
  4. Deleting individual entries from a flat file
    By GWalnum in forum PHP Development
    Replies: 4
    Last Post: September 5th, 2003, 03:01 PM
  5. Deleting blank entries from array?
    By Sotonin in forum PHP Development
    Replies: 11
    Last Post: May 19th, 2003, 09:14 PM

IMN logo majestic logo threadwatch logo seochat tools logo