Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Maxium number of columns in one table

Author  Topic 

jung1975
Aged Yak Warrior

503 Posts

Posted - 2005-01-13 : 11:21:48
What is the maximum number of columns that you can create in one table? Let's say the data type of each column is smallint 2 ( except two columns are varchar(300) )



MichaelP
Jedi Yak

2489 Posts

Posted - 2005-01-13 : 11:25:04
I believe that it's 255 or 256.
Usually it's not a good idea to have a table with that many columns. It usually indicates a bad design.

Michael

<Yoda>Use the Search page you must. Find the answer you will.</Yoda>
Go to Top of Page

Seventhnight
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2005-01-13 : 11:26:07
quote:
From BOL
SQL Server can have as many as two billion tables per database and 1,024 columns per table. The number of rows and total size of the table are limited only by the available storage. The maximum number of bytes per row is 8,060.



Big question... are you afraid of hitting the maximum?? Why so many columns

Corey
Go to Top of Page

Seventhnight
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2005-01-13 : 11:37:20


Corey
Go to Top of Page

Bustaz Kool
Master Smack Fu Yak Hacker

1834 Posts

Posted - 2005-01-13 : 11:41:56
Books Online (Sigh) If it was a woman, I'd marry it.

HTH

=================================================================

Scriptures, n. The sacred books of our holy religion, as distinguished from the false and profane writings on which all other faiths are based.
-Ambrose Bierce, writer (1842-1914) [The Devil's Dictionary]
Go to Top of Page
   

- Advertisement -