<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: How to move a column in MySQL</title>
	<atom:link href="http://www.masaokitamura.com/2008/08/how-to-move-a-column-in-mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.masaokitamura.com/2008/08/how-to-move-a-column-in-mysql/</link>
	<description>Blog</description>
	<lastBuildDate>Fri, 20 Jan 2012 19:51:22 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2-beta1-17916</generator>
	<item>
		<title>By: TeamOneJ</title>
		<link>http://www.masaokitamura.com/2008/08/how-to-move-a-column-in-mysql/#comment-350</link>
		<dc:creator>TeamOneJ</dc:creator>
		<pubDate>Sat, 03 Sep 2011 23:33:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.masaokitamura.com/?p=15#comment-350</guid>
		<description>More accurately stated…

Move a column after some other column
&lt;blockquote&gt;
mysql&gt; ALTER TABLE `mytable` MODIFY COLUMN `mycolumn` [mycolumn definition] AFTER `someothercolumn`;
&lt;/blockquote&gt;

Move a column to the first position
&lt;blockquote&gt;
mysql&gt; ALTER TABLE `mytable` MODIFY COLUMN `mycolumn` [mycolumn definition] FIRST;
&lt;/blockquote&gt;

&lt;a href=&quot;http://dev.mysql.com/doc/refman/5.5/en/alter-table.html&quot; rel=&quot;nofollow&quot;&gt;ALTER TABLE Syntax&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>More accurately stated…</p>
<p>Move a column after some other column</p>
<blockquote><p>
mysql&gt; ALTER TABLE `mytable` MODIFY COLUMN `mycolumn` [mycolumn definition] AFTER `someothercolumn`;
</p></blockquote>
<p>Move a column to the first position</p>
<blockquote><p>
mysql&gt; ALTER TABLE `mytable` MODIFY COLUMN `mycolumn` [mycolumn definition] FIRST;
</p></blockquote>
<p><a href="http://dev.mysql.com/doc/refman/5.5/en/alter-table.html" rel="nofollow">ALTER TABLE Syntax</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Liviu S</title>
		<link>http://www.masaokitamura.com/2008/08/how-to-move-a-column-in-mysql/#comment-306</link>
		<dc:creator>Liviu S</dc:creator>
		<pubDate>Mon, 15 Aug 2011 07:54:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.masaokitamura.com/?p=15#comment-306</guid>
		<description>Actually it could be done in the same query. For example:
ALTER TABLE mytable MODIFY COLUMN mycolumn VARCHAR(1000) AFTER someothercolumn;

If you have data in the column you intend to move (varchar for example) you (may) lose it completely when moving and changing to INT.

Thanks Masao :)</description>
		<content:encoded><![CDATA[<p>Actually it could be done in the same query. For example:<br />
ALTER TABLE mytable MODIFY COLUMN mycolumn VARCHAR(1000) AFTER someothercolumn;</p>
<p>If you have data in the column you intend to move (varchar for example) you (may) lose it completely when moving and changing to INT.</p>
<p>Thanks Masao <img src='http://www.masaokitamura.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul</title>
		<link>http://www.masaokitamura.com/2008/08/how-to-move-a-column-in-mysql/#comment-289</link>
		<dc:creator>Paul</dc:creator>
		<pubDate>Sat, 30 Jul 2011 09:28:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.masaokitamura.com/?p=15#comment-289</guid>
		<description>Thanks!

So basically, if your column is of a type other than INT, you&#039;ll need to remake it the way it was AFTER you move it. For ENUMs, copy-paste :)</description>
		<content:encoded><![CDATA[<p>Thanks!</p>
<p>So basically, if your column is of a type other than INT, you&#8217;ll need to remake it the way it was AFTER you move it. For ENUMs, copy-paste <img src='http://www.masaokitamura.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron</title>
		<link>http://www.masaokitamura.com/2008/08/how-to-move-a-column-in-mysql/#comment-225</link>
		<dc:creator>Aaron</dc:creator>
		<pubDate>Sat, 23 Apr 2011 16:08:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.masaokitamura.com/?p=15#comment-225</guid>
		<description>Thanks!</description>
		<content:encoded><![CDATA[<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom Buchok</title>
		<link>http://www.masaokitamura.com/2008/08/how-to-move-a-column-in-mysql/#comment-3</link>
		<dc:creator>Tom Buchok</dc:creator>
		<pubDate>Fri, 12 Jun 2009 02:54:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.masaokitamura.com/?p=15#comment-3</guid>
		<description>Thanks a lot for this.  Exactly what I needed.</description>
		<content:encoded><![CDATA[<p>Thanks a lot for this.  Exactly what I needed.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

