Friday, February 24, 2012

Column Limit = 1024?

I am adding columns to one of my tables since I noticed the column
limit to SQL Server tables is now 1024. However, I am using the
Enterprise Manager to add the columns, and it stopped allowing me to
enter more columns once I got up to about 292 columns. Is the
Enterprise Manager not capable of handling 1024 columns? Is there
another method I should use to add columns? Or is the column limit
not really 1024?
Thanks in advance for your help,
Dominic Isaia
disaia@.spacecraft.comyou won't get this problem if you use Query Analyzer.
"Dominic Isaia" <disaia@.spacecraft.com> wrote in message
news:d8ecad62.0311201503.567f217a@.posting.google.com...
> I am adding columns to one of my tables since I noticed the column
> limit to SQL Server tables is now 1024. However, I am using the
> Enterprise Manager to add the columns, and it stopped allowing me to
> enter more columns once I got up to about 292 columns. Is the
> Enterprise Manager not capable of handling 1024 columns? Is there
> another method I should use to add columns? Or is the column limit
> not really 1024?
>
> Thanks in advance for your help,
> Dominic Isaia
> disaia@.spacecraft.com|||Thanks, it works fine by using 'alter table' in the Query Analyzer.
However, it did generate an error message which might be why the
Enterprise Manager stopped allowing me to add columns. Even though
the column limit is 1024, there is a limit on the bytes per row, which
is 8060. I am using varchar as my type giving everything a 50
character length, knowing that if the data is only 2 characters it
will only take up 2 bytes of storage space and discard the 48
remaining. But I think it has to allow for 50 characters just in
case, which is why I went over that 8060 limit. Problem solved by
lowering the character length of most of my columns.
Dominic Isaia
disaia@.spacecraft.com

No comments:

Post a Comment