Guys,I have a script that adds a column to an existing table:if NOT exists (select * from dbo.syscolumns where name = 'MyCol' and id = object_id(N'[MyTable]'))begin alter table dbo.MyTable add MyCol nvarchar(4000) nullend elsebegin print '2'end
Upon first execution, the table is created and everything is cool. If we re-reun the script (which of course checks first to see if the column exists) it appears that the logic check succeeds as '2' is printed to the screen, though I also receive the following error/warning:Warning: The table 'MyTable' has been created but its maximum row size (16053) exceeds the maximum number of bytes per row (8060). INSERT or UPDATE of a row in this table will fail if the resulting row length exceeds 8060 bytes.2
What is happening behind the scenes?Nathan Skerl