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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Active Protection takes the fight to cryptojacking

While there were several headline-grabbing ransomware attacks during in 2017, another big threat started appearing at the same time that didn’t get the same coverage – illicit cryptomining.

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.
al4629740Author Commented:
How do I know how many bytes per row there will be?
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.