Closed Thread
Results 1 to 3 of 3

Thread: Deleting Table Contents

  1. #1
    millsy007 is offline Newbie
    Join Date
    Feb 2009
    Posts
    15
    Rep Power
    0

    Deleting Table Contents

    Hi, I want to delete the contents of my table so that when I add a new row after my auto increment index starts again at 1, how do I achieve this?

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Join Date
    Jul 2006
    Posts
    16,491
    Blog Entries
    75
    Rep Power
    143

    Re: Deleting Table Contents

    You mean "DELETE FROM table"?
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

  4. #3
    Join Date
    Sep 2007
    Location
    Karlstad, Sweden
    Posts
    3,082
    Blog Entries
    7
    Rep Power
    42

    Re: Deleting Table Contents

    you can also do "TRUNCATE TABLE tablename", that resets auto_increment counter from version 5.0.13 of mysql
    __________________________________________
    I study Information Systems at Karlstad University when I'm not on CodeCall

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Deleting from a file
    By hbk in forum C and C++
    Replies: 1
    Last Post: 11-05-2010, 02:22 PM
  2. Reading CSV contents
    By spadez in forum C and C++
    Replies: 9
    Last Post: 02-03-2009, 10:44 AM
  3. Log a script contents
    By Hektor in forum Linux Programming and Scripting
    Replies: 3
    Last Post: 11-18-2008, 06:31 AM
  4. Replies: 7
    Last Post: 08-27-2008, 07:48 AM
  5. Encrypting Contents
    By RobSoftware in forum PHP Development
    Replies: 3
    Last Post: 06-26-2007, 06:00 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts