Sample Header Ad - 728x90

Table size is not changed after new column is added

2 votes
1 answer
780 views
I am trying to check how the table size is going to be increased after adding new column with default values. I use the following default values: NULL, ''(empty string) and some text(some random text)` but it seems the table size is not changed. I am using the following statements: EXEC sp_spaceused '[Table_A]'; ALTER TABLE [dbo].[Table_A] ADD [Loops] NVARCHAR(900) CONSTRAINT [DF_Loops] DEFAULT('XXX') WITH VALUES; EXEC sp_spaceused '[Table_A]'; ALTER TABLE [dbo].[Table_A] DROP CONSTRAINT [DF_Loops] ALTER TABLE [dbo].[Table_A] DROP COLUMN [Loops]; but the sp_spaceused always returns: name rows reserved data index_size unused ------------------------------------------------- -------------------- ------------------ ------------------ ------------------ ------------------ Table_A 73540994 8701688 KB 6658544 KB 2042976 KB 168 KB Could anyone tell what I am doing wrong?
Asked by gotqn (4348 rep)
Jan 29, 2015, 01:13 PM
Last activity: Nov 24, 2022, 05:45 PM