Max number of columns in a table if using just the float data type

Hi  - because I really dont want to get this wrong - how many float columns can a SQL Server 2000 table hold. I know that the max row size is 8060 bytes.
Paul_BlacklerAsked:
Who is Participating?
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.

dbaSQLCommented:
the max number of columns sql v2000 table can have is 1024 -- providing they don't exceed the 8k per row, as you've stated.

i do not know if there is any reason why 1 or all of these could not be float
0
Paul_BlacklerAuthor Commented:
But if a float is used and filled to the maximum, there will be a finite number of columns that could be used surely as we have 8060 bytes - its that number that I am looking for?
0
Anthony PerkinsCommented:
A float takes up 8 bytes so you could potentially have more than 1000 columns.

Personally unless I was working on an Astronomy project I would never use float.  But whatever works for you.
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

Anthony PerkinsCommented:
And I should have added, IMHO any table that has half as many columns as that is highly suspect.
0
dbaSQLCommented:
agreed w/ac on that -- it's an awful lot of columns.  but, in the event that you have that many, or even fewer, as float, you are still restricted to the 1024 columns per table.  SQL isn't going to restrict you further if they're all float.  it will create the table, you will just be told that if you define the table with a row length greater than 8060, your inserts aren't going to work.
0

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
Anthony PerkinsCommented:
By the way when I stated you could have more than 1000 columns, I was making the assumption that you did not allow Nulls.  If you do than the total number of columns is significantly less.
0
Paul_BlacklerAuthor Commented:
acperkins - you stated if you did not allow nulls it would be far less - but surely if you did allow nulls it would still be 1000 would it not? :)
0
Anthony PerkinsCommented:
>>but surely if you did allow nulls it would still be 1000 would it not? :)<<
Nope.  Enabling Nulls requires overhead.  Hence less than 1000 columns.

0
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.