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?
al4629740Asked:
Who is Participating?
 
RimvisCommented:
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?
http://www.developer.com/db/article.php/3736011/Using-Vertical-and-Horizontal-Table-Structures-in-Oracle.htm


0
 
al4629740Author Commented:
sooo, 30000?
0
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.

 
TempDBACommented:
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.
0
 
al4629740Author Commented:
How do I know how many bytes per row there will be?
0
 
RimvisCommented:
http://msdn.microsoft.com/en-us/library/ms189124.aspx

Look for row size calculations:

Row_Size = Fixed_Data_Size + Variable_Data_Size + Null_Bitmap + 4
0
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.