Solved

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

Posted on 2011-03-15
4
351 Views
Last Modified: 2012-05-11
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
Comment
Question by:afacts
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
4 Comments
 

Author Comment

by:afacts
ID: 35140672
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
 

Accepted Solution

by:
afacts earned 0 total points
ID: 35140765
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
 

Author Closing Comment

by:afacts
ID: 35140769
Got the answer I needed ...
0

Featured Post

Want Experts Exchange at your fingertips?

With Experts Exchange’s latest app release, you can now experience our most recent features, updates, and the same community interface while on-the-go. Download our latest app release at the Android or Apple stores today!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question