Thread: delete row(s)

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

    Join Date
    Jul 2000
    Location
    Malaysia
    Posts
    13
    Rep Power
    0
    greetings.

    i know this sounds silly, but i only know how to do insert and update queries, in order to add new row(s) and to update existing row(s). but if i were to remove a row in my table, what is the sql syntax?

    thank you in advance.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    73
    Rep Power
    15
    delete from Table where name ='fred';

    this will delete ALL rows from table 'Table' where the name field is fred.

    if you have many fields the same make sure you have a unique column eg primary key that you can search on.

    do try this out on a table you can afford to loose because once you start deleting, its hard to recover (make a copy )
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    Malaysia
    Posts
    13
    Rep Power
    0
    many2 thanks 2 u, des!

Similar Threads

  1. Delete rows but without any extra specification?
    By xpatriot in forum MySQL Help
    Replies: 3
    Last Post: January 16th, 2004, 07:57 PM
  2. Excel - delete rows containing 0?
    By direwolf in forum Visual Basic Programming
    Replies: 1
    Last Post: January 1st, 2004, 12:45 AM
  3. Replies: 2
    Last Post: September 22nd, 2003, 09:27 PM
  4. How to delete multiple rows
    By clio in forum Beginner Programming
    Replies: 9
    Last Post: August 28th, 2003, 09:07 AM
  5. delete multi table rows..help
    By ferre in forum MySQL Help
    Replies: 3
    Last Post: August 19th, 2003, 11:01 PM

IMN logo majestic logo threadwatch logo seochat tools logo