SQL Server Performance

A big question in SQL Server - create a table with more than 1024 columns?

Discussion in 'Other SQL Server Blogs around the Web' started by Anonymous, Apr 6, 2009.

  1. Anonymous New Member

    IT was an interesting question to ask/know about create a table with more than 1024 columns? If you try to do so then obvious error: CREATE TABLE failed because column '&lt;ColName&gt;' in table 'MaxSparseColumnTest' exceeds the maximum of 1024 columns. To reproduce the behaviour use the Query posted by fellow MVP - Aaron Bertrand: IF EXISTS(SELECT * FROM SYS.tables WHERE name = 'MaxSparseColumnTest') DROP TABLE MaxSparseColumnTest DECLARE @i INT, @SQL VARCHAR(MAX) SET @i = 1 SET @SQL = 'CREATE TABLE...(<a href="http://sqlserver-qa.net/blogs/t-sql/archive/2009/04/06/5333.aspx">read more</a>)<img src="http://sqlserver-qa.net/aggbug.aspx?PostID=5333" width="1" height="1">

Share This Page