<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: SQL SERVER &#8211; Change Order of Column In Database Tables</title>
	<atom:link href="http://blog.sqlauthority.com/2008/04/08/sql-server-change-order-of-column-in-database-tables/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2008/04/08/sql-server-change-order-of-column-in-database-tables/</link>
	<description>Personal Notes of Pinal Dave</description>
	<lastBuildDate>Sun, 12 Feb 2012 09:22:39 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Vinod</title>
		<link>http://blog.sqlauthority.com/2008/04/08/sql-server-change-order-of-column-in-database-tables/#comment-236403</link>
		<dc:creator><![CDATA[Vinod]]></dc:creator>
		<pubDate>Fri, 13 Jan 2012 05:08:10 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=562#comment-236403</guid>
		<description><![CDATA[I think you can change the order of columns through the management studio using following steps( I am using SQL Server 2005)....


1) Right click table name and select &#039;Design&#039;
2) In the design view click the field which you want to move
3) Then you can see an arrow/triangle on the left bar against the field
4) Click on the arrow/traingle and hold the left mouse button and drag the field to the appropriate position.

Cheers]]></description>
		<content:encoded><![CDATA[<p>I think you can change the order of columns through the management studio using following steps( I am using SQL Server 2005)&#8230;.</p>
<p>1) Right click table name and select &#8216;Design&#8217;<br />
2) In the design view click the field which you want to move<br />
3) Then you can see an arrow/triangle on the left bar against the field<br />
4) Click on the arrow/traingle and hold the left mouse button and drag the field to the appropriate position.</p>
<p>Cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jacou</title>
		<link>http://blog.sqlauthority.com/2008/04/08/sql-server-change-order-of-column-in-database-tables/#comment-179566</link>
		<dc:creator><![CDATA[jacou]]></dc:creator>
		<pubDate>Sun, 16 Oct 2011 14:47:39 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=562#comment-179566</guid>
		<description><![CDATA[Thank you Pinal Dave, your article is always clear.

But one cannot defend the idea that the Order of colums is not important. I would like to cite two cases:

To create a table from a tab separated CSV file in DOS format, one uses:

CREATE TABLE products
(
  code VARCHAR(40),
  codeSupplier VARCHAR(100),
  Name VARCHAR(255)
)
GO

BULK INSERT products
FROM &#039;D:\tmp\products.txt&#039;
WITH
(
  FIELDTERMINATOR = &#039;\t&#039;,
  ROWTERMINATOR = &#039;\n&#039;
)
GO

One reasonably adds a column ID, as auto_increment field and as Primary key:
ALTER TABLE products ADD [ID] [int] IDENTITY(1,1) NOT NULL;
ALTER TABLE products ADD CONSTRAINT PK_products PRIMARY KEY(ID);

My ID column is at the end of the table. My table shape is very ugly if you show it even in SQL Server Management Studio, ID should be at the first place.


Case 2:

One has a directory table with fields:
ID, Surname, Firstname, Birthday, Address, City, Country, Notes.

With the time passing, the developper must add a colum like Deathday, as the life is not eternal, to notify the death of our preferred singer Miachael Kackson for example. 

My modified would be like 
ID, Surname, Firstname, Birthday, Address, City, Country, Notes, Deathday.

It&#039;s a very ugly table shape as Birthday and Deathday are not at the vicinity. If one edits the data in SQL management studio, the birthday and deathday columns would be better one aside another.

OK One can modify this in SQL Mangement Studio, but it would be better to do it in a quetry, as one could do in MySQL database.]]></description>
		<content:encoded><![CDATA[<p>Thank you Pinal Dave, your article is always clear.</p>
<p>But one cannot defend the idea that the Order of colums is not important. I would like to cite two cases:</p>
<p>To create a table from a tab separated CSV file in DOS format, one uses:</p>
<p>CREATE TABLE products<br />
(<br />
  code VARCHAR(40),<br />
  codeSupplier VARCHAR(100),<br />
  Name VARCHAR(255)<br />
)<br />
GO</p>
<p>BULK INSERT products<br />
FROM &#8216;D:\tmp\products.txt&#8217;<br />
WITH<br />
(<br />
  FIELDTERMINATOR = &#8216;\t&#8217;,<br />
  ROWTERMINATOR = &#8216;\n&#8217;<br />
)<br />
GO</p>
<p>One reasonably adds a column ID, as auto_increment field and as Primary key:<br />
ALTER TABLE products ADD [ID] [int] IDENTITY(1,1) NOT NULL;<br />
ALTER TABLE products ADD CONSTRAINT PK_products PRIMARY KEY(ID);</p>
<p>My ID column is at the end of the table. My table shape is very ugly if you show it even in SQL Server Management Studio, ID should be at the first place.</p>
<p>Case 2:</p>
<p>One has a directory table with fields:<br />
ID, Surname, Firstname, Birthday, Address, City, Country, Notes.</p>
<p>With the time passing, the developper must add a colum like Deathday, as the life is not eternal, to notify the death of our preferred singer Miachael Kackson for example. </p>
<p>My modified would be like<br />
ID, Surname, Firstname, Birthday, Address, City, Country, Notes, Deathday.</p>
<p>It&#8217;s a very ugly table shape as Birthday and Deathday are not at the vicinity. If one edits the data in SQL management studio, the birthday and deathday columns would be better one aside another.</p>
<p>OK One can modify this in SQL Mangement Studio, but it would be better to do it in a quetry, as one could do in MySQL database.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cesar</title>
		<link>http://blog.sqlauthority.com/2008/04/08/sql-server-change-order-of-column-in-database-tables/#comment-168842</link>
		<dc:creator><![CDATA[cesar]]></dc:creator>
		<pubDate>Fri, 16 Sep 2011 21:07:38 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=562#comment-168842</guid>
		<description><![CDATA[Thanks Sarin Shah, that worked great for me! I cant change the stru of the tables then i went as you said Tools -&gt; Options -&gt; Designers -&gt; Table and database designers and Unselect default option “Prevent saving changes that require table re-creation” and  now i can change  the stru of my tables!

Thanks !]]></description>
		<content:encoded><![CDATA[<p>Thanks Sarin Shah, that worked great for me! I cant change the stru of the tables then i went as you said Tools -&gt; Options -&gt; Designers -&gt; Table and database designers and Unselect default option “Prevent saving changes that require table re-creation” and  now i can change  the stru of my tables!</p>
<p>Thanks !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jordan</title>
		<link>http://blog.sqlauthority.com/2008/04/08/sql-server-change-order-of-column-in-database-tables/#comment-160590</link>
		<dc:creator><![CDATA[Jordan]]></dc:creator>
		<pubDate>Mon, 22 Aug 2011 12:08:19 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=562#comment-160590</guid>
		<description><![CDATA[Hello Pinal, 
I just wanted to comment that your article is really solid. Thanks a lot.]]></description>
		<content:encoded><![CDATA[<p>Hello Pinal,<br />
I just wanted to comment that your article is really solid. Thanks a lot.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Saraswati</title>
		<link>http://blog.sqlauthority.com/2008/04/08/sql-server-change-order-of-column-in-database-tables/#comment-144592</link>
		<dc:creator><![CDATA[Saraswati]]></dc:creator>
		<pubDate>Wed, 29 Jun 2011 05:07:41 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=562#comment-144592</guid>
		<description><![CDATA[Awesome.... it worked very well. It is very simple to follow than others.Thanks alot]]></description>
		<content:encoded><![CDATA[<p>Awesome&#8230;. it worked very well. It is very simple to follow than others.Thanks alot</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Reza</title>
		<link>http://blog.sqlauthority.com/2008/04/08/sql-server-change-order-of-column-in-database-tables/#comment-141668</link>
		<dc:creator><![CDATA[Reza]]></dc:creator>
		<pubDate>Fri, 17 Jun 2011 17:05:15 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=562#comment-141668</guid>
		<description><![CDATA[Sarin that worked a treat, I&#039;m sure SQL 2000 might have a similar option.  I went for the Tools option, then went to design mode, and dragged the column to the right place! Saved it, and it was accepted!]]></description>
		<content:encoded><![CDATA[<p>Sarin that worked a treat, I&#8217;m sure SQL 2000 might have a similar option.  I went for the Tools option, then went to design mode, and dragged the column to the right place! Saved it, and it was accepted!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sarin Shah</title>
		<link>http://blog.sqlauthority.com/2008/04/08/sql-server-change-order-of-column-in-database-tables/#comment-136622</link>
		<dc:creator><![CDATA[Sarin Shah]]></dc:creator>
		<pubDate>Wed, 25 May 2011 16:08:03 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=562#comment-136622</guid>
		<description><![CDATA[In SQl server 2008:

Use SQL Server Management Studio (2008) and from the menu go to Tools -&gt; Options -&gt; Designers -&gt; Table and database designers and Unselect default option &quot;Prevent saving changes that require table re-creation&quot;

For DBA: Can change field order in &quot;colorder&quot; column in syscolumns table]]></description>
		<content:encoded><![CDATA[<p>In SQl server 2008:</p>
<p>Use SQL Server Management Studio (2008) and from the menu go to Tools -&gt; Options -&gt; Designers -&gt; Table and database designers and Unselect default option &#8220;Prevent saving changes that require table re-creation&#8221;</p>
<p>For DBA: Can change field order in &#8220;colorder&#8221; column in syscolumns table</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: raja</title>
		<link>http://blog.sqlauthority.com/2008/04/08/sql-server-change-order-of-column-in-database-tables/#comment-134591</link>
		<dc:creator><![CDATA[raja]]></dc:creator>
		<pubDate>Mon, 16 May 2011 11:22:21 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=562#comment-134591</guid>
		<description><![CDATA[if we want to change datatype of a table&#039;s column then we use below statement,

ALTER table table_name
 alter column column_name new_datatype

similarly I need to rename the column name then how it is possible?

(somebody say avoid to use the following qry sp_rename &#039;newColumnname&#039;, &#039;oldname&#039;, &#039;COLUMN&#039;)



Regards,

Raja]]></description>
		<content:encoded><![CDATA[<p>if we want to change datatype of a table&#8217;s column then we use below statement,</p>
<p>ALTER table table_name<br />
 alter column column_name new_datatype</p>
<p>similarly I need to rename the column name then how it is possible?</p>
<p>(somebody say avoid to use the following qry sp_rename &#8216;newColumnname&#8217;, &#8216;oldname&#8217;, &#8216;COLUMN&#8217;)</p>
<p>Regards,</p>
<p>Raja</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: AbdulQadir</title>
		<link>http://blog.sqlauthority.com/2008/04/08/sql-server-change-order-of-column-in-database-tables/#comment-130308</link>
		<dc:creator><![CDATA[AbdulQadir]]></dc:creator>
		<pubDate>Thu, 21 Apr 2011 06:14:51 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=562#comment-130308</guid>
		<description><![CDATA[Nice.]]></description>
		<content:encoded><![CDATA[<p>Nice.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Madhivanan</title>
		<link>http://blog.sqlauthority.com/2008/04/08/sql-server-change-order-of-column-in-database-tables/#comment-89111</link>
		<dc:creator><![CDATA[Madhivanan]]></dc:creator>
		<pubDate>Thu, 23 Sep 2010 13:08:54 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=562#comment-89111</guid>
		<description><![CDATA[Yes. You need to use ALTER statement

ALTER table table_name
alter column column_name new_datatype]]></description>
		<content:encoded><![CDATA[<p>Yes. You need to use ALTER statement</p>
<p>ALTER table table_name<br />
alter column column_name new_datatype</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom</title>
		<link>http://blog.sqlauthority.com/2008/04/08/sql-server-change-order-of-column-in-database-tables/#comment-89095</link>
		<dc:creator><![CDATA[Tom]]></dc:creator>
		<pubDate>Thu, 23 Sep 2010 11:26:23 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=562#comment-89095</guid>
		<description><![CDATA[Hi, 
Can we change the datatype of a column that is once created. I am a newbie. So, if this is a very silly question, please pardon.]]></description>
		<content:encoded><![CDATA[<p>Hi,<br />
Can we change the datatype of a column that is once created. I am a newbie. So, if this is a very silly question, please pardon.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dinesh</title>
		<link>http://blog.sqlauthority.com/2008/04/08/sql-server-change-order-of-column-in-database-tables/#comment-66244</link>
		<dc:creator><![CDATA[Dinesh]]></dc:creator>
		<pubDate>Thu, 22 Apr 2010 13:33:21 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=562#comment-66244</guid>
		<description><![CDATA[Thanks a lot. Nice and Simple.]]></description>
		<content:encoded><![CDATA[<p>Thanks a lot. Nice and Simple.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sinshith</title>
		<link>http://blog.sqlauthority.com/2008/04/08/sql-server-change-order-of-column-in-database-tables/#comment-64967</link>
		<dc:creator><![CDATA[Sinshith]]></dc:creator>
		<pubDate>Sat, 10 Apr 2010 10:47:05 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=562#comment-64967</guid>
		<description><![CDATA[The technique worked out for me..Thank you very much]]></description>
		<content:encoded><![CDATA[<p>The technique worked out for me..Thank you very much</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dean Bullen</title>
		<link>http://blog.sqlauthority.com/2008/04/08/sql-server-change-order-of-column-in-database-tables/#comment-63333</link>
		<dc:creator><![CDATA[Dean Bullen]]></dc:creator>
		<pubDate>Fri, 19 Mar 2010 15:56:09 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=562#comment-63333</guid>
		<description><![CDATA[Good article.  

I would be wary of using your method 2.  This is because it would be easy to forget to add all the appropriate permissions to your new table, or possibly triggers, constraints, etc.  I prefer the other options, where the original table is retained.

With regard to method 1, remember that when you use  SSMS, instead of executing the changes straight away you can have the changes scripted, so you could create a scheduled job to make the changes out of hours, minimising disruption?

Or how about recreating all the columns that follow the position where you want to insert one, then systematically copy data from the &quot;old&quot; to &quot;new&quot; columns, and then drop the old column and rename the new one.  An example is below, where our table originally has col1 and col3, and we want to insert a col2 in between them.  

CREATE TABLE test (col1 INT, col3 INT)

INSERT INTO test VALUES (1,3)
GO 1000000

ALTER TABLE test ADD col2 INT
ALTER TABLE test ADD col3_new INT

UPDATE test SET col3_new = col3

ALTER TABLE test DROP COLUMN col3
EXEC sp_rename @objname = &#039;test.col3_new&#039;, @newname = &#039;col3&#039;, @objtype = &#039;COLUMN&#039;

SELECT * FROM [YFi].[dbo].[test]

Cumbersome, but in some circumstances it could work.  If locking becomes an issue you could replace the UPDATE statements with a cursor, that only updates (and therefore locks) one record at a time?  Not pretty, but it could fit this occasional requirement?]]></description>
		<content:encoded><![CDATA[<p>Good article.  </p>
<p>I would be wary of using your method 2.  This is because it would be easy to forget to add all the appropriate permissions to your new table, or possibly triggers, constraints, etc.  I prefer the other options, where the original table is retained.</p>
<p>With regard to method 1, remember that when you use  SSMS, instead of executing the changes straight away you can have the changes scripted, so you could create a scheduled job to make the changes out of hours, minimising disruption?</p>
<p>Or how about recreating all the columns that follow the position where you want to insert one, then systematically copy data from the &#8220;old&#8221; to &#8220;new&#8221; columns, and then drop the old column and rename the new one.  An example is below, where our table originally has col1 and col3, and we want to insert a col2 in between them.  </p>
<p>CREATE TABLE test (col1 INT, col3 INT)</p>
<p>INSERT INTO test VALUES (1,3)<br />
GO 1000000</p>
<p>ALTER TABLE test ADD col2 INT<br />
ALTER TABLE test ADD col3_new INT</p>
<p>UPDATE test SET col3_new = col3</p>
<p>ALTER TABLE test DROP COLUMN col3<br />
EXEC sp_rename @objname = &#8216;test.col3_new&#8217;, @newname = &#8216;col3&#8242;, @objtype = &#8216;COLUMN&#8217;</p>
<p>SELECT * FROM [YFi].[dbo].[test]</p>
<p>Cumbersome, but in some circumstances it could work.  If locking becomes an issue you could replace the UPDATE statements with a cursor, that only updates (and therefore locks) one record at a time?  Not pretty, but it could fit this occasional requirement?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yoel</title>
		<link>http://blog.sqlauthority.com/2008/04/08/sql-server-change-order-of-column-in-database-tables/#comment-62601</link>
		<dc:creator><![CDATA[Yoel]]></dc:creator>
		<pubDate>Wed, 10 Mar 2010 09:28:31 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=562#comment-62601</guid>
		<description><![CDATA[Regarding method 2:
I would suggest instead of dropping and recreating the original table - after copying the data to the temp table,  simply truncate the original table, add the new column, and then move the data back into it. Advantages: You won&#039;t have to worry about recreating keys/constraints/indexes on the table. Also once the table is truncated, adding a new column shouldn&#039;t cause a lock.
Disadvantages: Pinal&#039;s method involves moving the data only once, and my alternative moves it twice.]]></description>
		<content:encoded><![CDATA[<p>Regarding method 2:<br />
I would suggest instead of dropping and recreating the original table &#8211; after copying the data to the temp table,  simply truncate the original table, add the new column, and then move the data back into it. Advantages: You won&#8217;t have to worry about recreating keys/constraints/indexes on the table. Also once the table is truncated, adding a new column shouldn&#8217;t cause a lock.<br />
Disadvantages: Pinal&#8217;s method involves moving the data only once, and my alternative moves it twice.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER – Order of Columns in Update Statement Does not Matter Journey to SQL Authority with Pinal Dave</title>
		<link>http://blog.sqlauthority.com/2008/04/08/sql-server-change-order-of-column-in-database-tables/#comment-62203</link>
		<dc:creator><![CDATA[SQL SERVER – Order of Columns in Update Statement Does not Matter Journey to SQL Authority with Pinal Dave]]></dc:creator>
		<pubDate>Fri, 05 Mar 2010 01:31:49 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=562#comment-62203</guid>
		<description><![CDATA[[...] SQL SERVER – Change Order of Column In Database Tables Well, I strongly advocate that order of columns in database table should not matter. As a matter of fact, while searching for the subject, I end up on my own blog where I have previously suggested why it was necessary. I suggest you to make the right decision based on your business need. [...]]]></description>
		<content:encoded><![CDATA[<p>[...] SQL SERVER – Change Order of Column In Database Tables Well, I strongly advocate that order of columns in database table should not matter. As a matter of fact, while searching for the subject, I end up on my own blog where I have previously suggested why it was necessary. I suggest you to make the right decision based on your business need. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tejas Shah</title>
		<link>http://blog.sqlauthority.com/2008/04/08/sql-server-change-order-of-column-in-database-tables/#comment-60705</link>
		<dc:creator><![CDATA[Tejas Shah]]></dc:creator>
		<pubDate>Fri, 05 Feb 2010 11:03:23 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=562#comment-60705</guid>
		<description><![CDATA[Hi Sanmerum,

To change order of column, you just need to write column in that order in select statement.

Tejas]]></description>
		<content:encoded><![CDATA[<p>Hi Sanmerum,</p>
<p>To change order of column, you just need to write column in that order in select statement.</p>
<p>Tejas</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sanmerun</title>
		<link>http://blog.sqlauthority.com/2008/04/08/sql-server-change-order-of-column-in-database-tables/#comment-60701</link>
		<dc:creator><![CDATA[sanmerun]]></dc:creator>
		<pubDate>Fri, 05 Feb 2010 09:23:03 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=562#comment-60701</guid>
		<description><![CDATA[how can i change the order of column in data base using vb .net?]]></description>
		<content:encoded><![CDATA[<p>how can i change the order of column in data base using vb .net?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pinaldave</title>
		<link>http://blog.sqlauthority.com/2008/04/08/sql-server-change-order-of-column-in-database-tables/#comment-46239</link>
		<dc:creator><![CDATA[pinaldave]]></dc:creator>
		<pubDate>Mon, 02 Feb 2009 13:48:27 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=562#comment-46239</guid>
		<description><![CDATA[@alendra,
Please read the article, there is no such query.

Regards,
Pinal]]></description>
		<content:encoded><![CDATA[<p>@alendra,<br />
Please read the article, there is no such query.</p>
<p>Regards,<br />
Pinal</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: alendra</title>
		<link>http://blog.sqlauthority.com/2008/04/08/sql-server-change-order-of-column-in-database-tables/#comment-46237</link>
		<dc:creator><![CDATA[alendra]]></dc:creator>
		<pubDate>Mon, 02 Feb 2009 13:19:39 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=562#comment-46237</guid>
		<description><![CDATA[what is  the query for that changing the order of columns in a table]]></description>
		<content:encoded><![CDATA[<p>what is  the query for that changing the order of columns in a table</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jerry Hung</title>
		<link>http://blog.sqlauthority.com/2008/04/08/sql-server-change-order-of-column-in-database-tables/#comment-38122</link>
		<dc:creator><![CDATA[Jerry Hung]]></dc:creator>
		<pubDate>Thu, 15 May 2008 14:42:12 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=562#comment-38122</guid>
		<description><![CDATA[One shouldn&#039;t really change the order too often

I remember when we had to swap Latitude &amp; Longitude columns, it was a mess, so we just ended up renaming the column names. 
It&#039;s weird to see column1, Longitude, Latitude, column2 order though

SSMS sucks because it creates a TEMP table
copy everything from old table to TEMP
then rename TEMP table to your old table name
It ALWAYS times out if there is a lot of data

Do it in SQL Scripts]]></description>
		<content:encoded><![CDATA[<p>One shouldn&#8217;t really change the order too often</p>
<p>I remember when we had to swap Latitude &amp; Longitude columns, it was a mess, so we just ended up renaming the column names.<br />
It&#8217;s weird to see column1, Longitude, Latitude, column2 order though</p>
<p>SSMS sucks because it creates a TEMP table<br />
copy everything from old table to TEMP<br />
then rename TEMP table to your old table name<br />
It ALWAYS times out if there is a lot of data</p>
<p>Do it in SQL Scripts</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: suba ganesh</title>
		<link>http://blog.sqlauthority.com/2008/04/08/sql-server-change-order-of-column-in-database-tables/#comment-37174</link>
		<dc:creator><![CDATA[suba ganesh]]></dc:creator>
		<pubDate>Wed, 07 May 2008 09:46:29 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=562#comment-37174</guid>
		<description><![CDATA[wats the query for that &#039;changing the order of columns in a table&#039;]]></description>
		<content:encoded><![CDATA[<p>wats the query for that &#8216;changing the order of columns in a table&#8217;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ob</title>
		<link>http://blog.sqlauthority.com/2008/04/08/sql-server-change-order-of-column-in-database-tables/#comment-35415</link>
		<dc:creator><![CDATA[ob]]></dc:creator>
		<pubDate>Wed, 23 Apr 2008 16:53:25 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=562#comment-35415</guid>
		<description><![CDATA[When I add new column in Management Studio, my change times out after about one minute. How to prevent it?]]></description>
		<content:encoded><![CDATA[<p>When I add new column in Management Studio, my change times out after about one minute. How to prevent it?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott</title>
		<link>http://blog.sqlauthority.com/2008/04/08/sql-server-change-order-of-column-in-database-tables/#comment-35068</link>
		<dc:creator><![CDATA[Scott]]></dc:creator>
		<pubDate>Mon, 14 Apr 2008 20:24:32 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=562#comment-35068</guid>
		<description><![CDATA[Thanks for the post. I thought it was a good question. I personally like to have a rhythm and reason to the order of columns, especially when printing out a diagram of the database. I wish there was a better way of doing it instead of locking the table or creating a new table and deleting the old. Thanks for the posts.]]></description>
		<content:encoded><![CDATA[<p>Thanks for the post. I thought it was a good question. I personally like to have a rhythm and reason to the order of columns, especially when printing out a diagram of the database. I wish there was a better way of doing it instead of locking the table or creating a new table and deleting the old. Thanks for the posts.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

