#1
  1. No Profile Picture
    stefanbecker
    Guest
    Devshed Newbie (0 - 499 posts)
    Hi,

    is there a command for mysql just to wipe out all the data from a table, i dont want to delete the table! I just need to restart the table without setting up the fields and stuff again
  2. #2
  3. No Profile Picture
    rod k
    Guest
    Devshed Newbie (0 - 499 posts)
    delete from tablename;

    since no where clause is included it deletes all records

    HTH

    Rod
  4. #3
  5. No Profile Picture
    moderator
    Guest
    Devshed Newbie (0 - 499 posts)
    Note also that when you use the syntax:

    delete from tableName;

    It will reply that zero rows were affected....MySQL just says that to improve performance. If you want to see exactly how many records were deleted use this query:

    delete from tableName where 1=1;

Similar Threads

  1. how to keep table on top, not centered??
    By vinyl in forum HTML Programming
    Replies: 2
    Last Post: January 20th, 2004, 06:19 PM
  2. DB design - flat files or in a table
    By persaltier in forum Database Management
    Replies: 1
    Last Post: December 12th, 2003, 08:39 PM
  3. Controlling Multiple table Heights in a Browser
    By AttaBoy in forum HTML Programming
    Replies: 1
    Last Post: December 10th, 2003, 04:24 AM
  4. mouseover a table rows
    By robin01 in forum HTML Programming
    Replies: 3
    Last Post: April 3rd, 2003, 11:35 PM
  5. Replies: 2
    Last Post: March 27th, 2002, 04:10 AM

IMN logo majestic logo threadwatch logo seochat tools logo