More of a curious question I can't seem to quickly find an definite answer to.
In SQL Server 2008 is there a max limitation on the number of columns that are allowed in a view? From the MSDN article (below) I see that there is a limit of 4096 Columns per Select statement. Would this then be applied to a View?
Example:
CREATE VIEW [dbo].[TestView]
AS
SELECT Column1, Column2 FROM dbo.SomeTableName
Would I be limited to 4096 columns in this view?
http://msdn.microsoft.com/en-us/library/ms143432.aspx
By default of finding an authoritative source, I figured I'd try...
It appears that the limit is 1024 columns, that is the case in SQLServer 9.0 (both 'Express' and Enterprise versions).
The error message is: Msg 4505, Level 16, State 1, Procedure wvTest, Line 3 CREATE VIEW failed because column 'Yo1' in view 'vwTest' exceeds the maximum of 1024 columns.
Here is Microsoft link for complete details....
http://msdn.microsoft.com/en-us/library/ms143432.aspx
According to this Microsoft...
Columns per nonwide table | 1,024
Columns per wide table | 30,000
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With