SQL Server 最多可存多少列!
SQL Server 的每個資料庫最多可儲存 20 億個表,每個表可以有 1024 列。
表的行數及總大小僅受可用儲存空間的限制。
每行最多可以儲存 8,060 位元組。
如果建立具有 varchar、nvarchar 或 varbinary 列的表,並且列的位元組總數超過 8,060 位元組,雖然仍可以建立此表,但會出現警告資訊。
如果試圖插入超過 8,060 位元組的行或對行進行更新以至位元組總數超過 8,060,將出現錯誤資訊並且語句執行失敗。
幫助原文"
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. If you create tables with varchar
CREATE TABLE statements that include a sql_variant
The total row size (xx) for table 'yy' exceeds the maximum number of bytes per row (8060). Rows that exceed the maximum number of bytes will not be added.
This warning occurs because sql_variant can have a maximum length of 8016 bytes. When a sql_variant column contains values close to the maximum length, it can overshoot the row's maximum size limit.
Each table can contain a maximum of 249 nonclustered indexes and 1 clustered index. These include the indexes generated to support any PRIMARY KEY and UNIQUE constraints defined for the table.
SQL Server does not enforce an order in which DEFAULT, IDENTITY, ROWGUIDCOL, or column constraints are specified in a column definition.