Reseting auto_increment value on MySQL table

30 08 2006

After deleting every row from a table with an auto_increment column, the auto_increment value remains the same, so each insert after that does not start on 1, but on whatever it left off. To reset it:

ALTER TABLE myTable AUTO_INCREMENT=0;

Obviously, using this method you can set it to any value you wish. If the table contains a row with that auto_increment value, it will set it to the next available one.

Advertisements




Tini, URLConnections and the HTTP Protocol

30 08 2006

Content moved to http://awesomeful.net/posts/24-tini-urlconnections-and-the-http-protocol





HTTP POST from java client

30 08 2006

Content moved to http://awesomeful.net/posts/23-http-post-from-java-client





Squirrelmail Attachment size limit annoyance

21 08 2006

Content moved to http://awesomeful.net/posts/22-squirrelmail-attachment-size-limit-annoyance





Run commands on boot for Fedora Core.

21 08 2006

Content moved to http://awesomeful.net/posts/21-run-commands-on-boot-for-fedora-core





Installing vanilla Tomcat on Fedora Core.

21 08 2006

Content moved to http://awesomeful.net/posts/20-installing-vanilla-tomcat-on-fedora-core





MySQL unique key

17 08 2006

Content moved to http://awesomeful.net/posts/19-mysql-unique-key