Solved

Can the max number of columns for a table in MSSQL 2000 be set to over 1024?

Posted on 2006-07-12
4
233 Views
Last Modified: 2008-03-10
I have checked some online books for SQL and queried EE to find out if there is away to increase the max number of columns that are allowed in a table in MSSQL 2000.   Apparently the limit is 1024.  I'm wondering if that is a default value that can be increased?

Thank you.
0
Comment
Question by:BladesAway
  • 3
4 Comments
 
LVL 27

Accepted Solution

by:
ptjcb earned 100 total points
ID: 17094178
It is 1024 and it is not user-configurable.
0
 
LVL 65

Expert Comment

by:Jim Horn
ID: 17094242
Just out of curiosity, what are your requirements which need more than 1024?
I'm sure there will be a work-around.
0
 
LVL 27

Expert Comment

by:ptjcb
ID: 17094290
You would have to break the base table into several smaller tables that do fit the requirement - sort of like vertical partioning. This link will give you some good ideas: http://www.sqlteam.com/Item.ASP?ItemID=684

You will also have to deal with the page size in SQL - it is 8K, with about 8,096 available for a row. You cannot have a row that spans pages.
0
 
LVL 27

Expert Comment

by:ptjcb
ID: 17094338
Sorry, the maximum size of a single data row is 8060 (some of the bytes are used as a header) - that is why you will see maximum bytes in a row as 8060. That also is not user-configurable and based on the size of the data page within SQL.
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Suggested Solutions

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
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…
Viewers will learn how the fundamental information of how to create a table.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

832 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