how many columnscan I have in sql 2008

I have a really big table I would like to make in my sql db.  What is the maximum amount of columns I can have?  Any concerns?
Who is Participating?
Hi al4629740,

30000 is the limit for the "wide" table, where most of the columns contain NULLs. You should be more concerted about "Bytes per row" limit, which is 8,060 bytes. There are cases, when total amount of data in a row can exceed 8 KB, but that's another story and is not applicable to a table with insane number of columns :)

IMHO you should reconsider your database design. Maybe you should create "vertical" table?

al4629740Author Commented:
sooo, 30000?
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

I totally agree with Rimvis. Its not the number of column but the size of the row that will decide the number of fields in the table.
al4629740Author Commented:
How do I know how many bytes per row there will be?

Look for row size calculations:

Row_Size = Fixed_Data_Size + Variable_Data_Size + Null_Bitmap + 4
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.