<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Albertech.net &#187; primary key</title>
	<atom:link href="http://albertech.net/tag/primary-key/feed/" rel="self" type="application/rss+xml" />
	<link>http://albertech.net</link>
	<description>Tips, Tricks, and Reviews in Linux, Apache, MySQL, PHP</description>
	<lastBuildDate>Wed, 28 Jul 2010 16:09:13 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Reset MySQL auto increment to 1</title>
		<link>http://albertech.net/2008/12/reset-mysql-auto-increment-to-1/</link>
		<comments>http://albertech.net/2008/12/reset-mysql-auto-increment-to-1/#comments</comments>
		<pubDate>Thu, 11 Dec 2008 20:04:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[auto_increment]]></category>
		<category><![CDATA[primary key]]></category>
		<category><![CDATA[reset]]></category>
		<category><![CDATA[truncate]]></category>

		<guid isPermaLink="false">http://albertech.net/?p=47</guid>
		<description><![CDATA[Here's a quick reference to reset the MySQL auto_increment field to 1 and <strong>delete</strong> <strong>ALL rows in a table</strong>. This is useful in case you had to do some testing and wanted to reset the primary key field back to 1 and clear out the table.

<code>truncate table [NAME OF TABLE]</code>

If you don't want to wipe out the table, you can reset the auto_increment by using:

<code>alter table [NAME OF TABLE] auto_increment=1</code>]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Falbertech.net%252F2008%252F12%252Freset-mysql-auto-increment-to-1%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Reset%20MySQL%20auto%20increment%20to%201%22%20%7D);"></div>
<p>Here&#8217;s a quick reference to reset the MySQL auto_increment field to 1 and <strong>delete</strong> <strong>ALL rows in a table</strong>. This is useful in case you had to do some testing and wanted to reset the primary key field back to 1 and clear out the table.</p>
<p><code>truncate table [NAME OF TABLE]</code></p>
<p>If you don&#8217;t want to wipe out the table, you can reset the auto_increment by using:</p>
<p><code>alter table [NAME OF TABLE] auto_increment=1</code></p>

]]></content:encoded>
			<wfw:commentRss>http://albertech.net/2008/12/reset-mysql-auto-increment-to-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
