SQL Server - Does column order matter?

后端 未结 6 839
陌清茗
陌清茗 2020-12-03 21:00

In terms of performance and optimizations:

  • When constructing a table in SQL Server, does it matter what order I put the columns in?
  • Does it matter if
6条回答
  •  时光取名叫无心
    2020-12-03 21:07

    In SQL Server 2005, placement of nullable variable length columns has a space impact - placing nullable variable size columns at the end of the definition can result in less space consumption.

    SQL Server 2008 adds the "SPARSE" column feature which negates this difference.

    See here.

提交回复
热议问题