<?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>Botsko.net - Web Development in Portland, Oregon &#187; MySQL</title>
	<atom:link href="http://www.botsko.net/blog/category/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.botsko.net/blog</link>
	<description>continuing education</description>
	<lastBuildDate>Thu, 15 Dec 2011 20:07:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Tech-Tidbit: Altering Primary Keys in MySQL</title>
		<link>http://www.botsko.net/blog/2007/03/29/tech-tidbit-altering-primary-keys-in-mysql/</link>
		<comments>http://www.botsko.net/blog/2007/03/29/tech-tidbit-altering-primary-keys-in-mysql/#comments</comments>
		<pubDate>Thu, 29 Mar 2007 16:04:49 +0000</pubDate>
		<dc:creator>Michael Botsko</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Tech-Tidbit]]></category>

		<guid isPermaLink="false">http://www.botsko.net/blog/?p=181</guid>
		<description><![CDATA[I&#8217;ve come to design every database table with an auto-increment id field that is a primary key. However, sometimes I work on projects where tables have no such column and may have duplicate rows. In order to drop the existing primary key definitions I run: [mysql] ALTER TABLE mytable DROP PRIMARY KEY; [/mysql] Then, I [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve come to design every database table with an auto-increment id field that is a primary key. However, sometimes I work on projects where tables have no such column and may have duplicate rows. In order to drop the existing primary key definitions I run:</p>
<p>[mysql]<br />
ALTER TABLE mytable DROP PRIMARY KEY;<br />
[/mysql]</p>
<p>Then, I add a new one:</p>
<p>[mysql]<br />
ALTER TABLE `mytable` ADD `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST ;<br />
[/mysql]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.botsko.net/blog/2007/03/29/tech-tidbit-altering-primary-keys-in-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

