• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 368
  • Last Modified:

When creating a table in SQL Server does the order of the columns matter?

I remember hearing a long time ago that column ordering in table creation matters.  That basically the columns with the 'lighter' datatypes int, bit, etc should go near the top and the 'heavier' ones varchar(2000), ntext, etc should go near the bottom.

Is this true?  I've been googling for more information but haven't found much.  I'm working on a schema for a new system that we'll be developing and I want to make it robust and scalable ... not to mention very well optimized.

Any helpful instruction would be greatly appreciated ...
0
afacts
Asked:
afacts
  • 4
1 Solution
 
afactsNetwork EngineerAuthor Commented:
hmmmm I may have answered my own question.  Right after posting I found this article here:

http://stackoverflow.com/questions/34818/sql-server-does-column-order-matter
0
 
afactsNetwork EngineerAuthor Commented:
0
 
afactsNetwork EngineerAuthor Commented:
One more:

http://www.sqlskills.com/BLOGS/KIMBERLY/post/Column-order-doesnt-matter-generally-but-IT-DEPENDS!.aspx

so basically in general it doesn't matter but best practice is move the variable length nullable fields to the end of the table if you have a lot of them and the DB is expected to be large ...
0
 
afactsNetwork EngineerAuthor Commented:
Got the answer I needed ...
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now