开发者

How many coulmns can exist per table [closed]

开发者_如何学编程 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 12 years ago.

How many coulmns can exist per table


The limit will vary depending on what database engine you're running, and for some engines, perhaps on configuration.

The practical answer is: as many as you need. If you're approaching the actual limit, you're doing something dead wrong in your database design.


Depends upon your SQL-Server and uppon the column-types you use.

  • For MySQL see here
  • The same is for PostGres: The Specs state "Maximum Columns per Table 250 - 1600 depending on column types" here


I agree with the others. It depends on your DBMS (Oracle, SQL, MySQL, whatever) it also depends on version.

For example in SQL server 7, 2000, & 2005 the limit is 1024 columns per base table. IN SQL 2008, however, there are non-wide & wide tables which are restricted to 1024 and 30,000 columns respectively. Microsoft has a "Maximum Capacity Specification" document that lists the vairious limits, like columns per table, or parameters per stored procedure.

  • SQL 7 & 2000 - http://msdn.microsoft.com/en-us/library/aa933149%28SQL.80%29.aspx
  • SQL 2005 - http://msdn.microsoft.com/en-us/library/ms143432%28SQL.90%29.aspx
  • SQL 2008 (32 bit vs 64 bit) http://msdn.microsoft.com/en-us/library/ms143432.aspx

A more likely limit in some DBMS's is the rowsize -- how long each row can be data-wise. For example in SQL Server 2000 was limied to 8K per row. SQL Server 2008 has a feature called row overflow storage that pushes wide data off a row, removing the pactical 8k limit.

I also agree with the others, if you are approaching the column limit your database needs a redesign.


That depends on both the database you are using and the version of that database.

If you have to ask that question, then you almost always need to refactor your design.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜