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, nvarchar, or varbinary columns in which the total defined width exceeds 8,060 bytes, the table is created, but a warning message appears. Trying to insert more than 8,060 bytes into such a row or to update a row so that its total row size exceeds 8,060 produces an error message and the statement fails.
CREATE TABLE statements that include a sql_variant column can generate the following warning:
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.