SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Maxium number of columns in one table
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

jung1975
Aged Yak Warrior

USA
503 Posts

Posted - 01/13/2005 :  11:21:48  Show Profile  Reply with Quote
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

USA
2489 Posts

Posted - 01/13/2005 :  11:25:04  Show Profile  Visit MichaelP's Homepage  Reply with Quote
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
Flowing Fount of Yak Knowledge

USA
2878 Posts

Posted - 01/13/2005 :  11:26:07  Show Profile  Visit Seventhnight's Homepage  Reply with Quote
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
Flowing Fount of Yak Knowledge

USA
2878 Posts

Posted - 01/13/2005 :  11:37:20  Show Profile  Visit Seventhnight's Homepage  Reply with Quote


Corey
Go to Top of Page

Bustaz Kool
Flowing Fount of Yak Knowledge

USA
1693 Posts

Posted - 01/13/2005 :  11:41:56  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000