Question: I have a test database with 1 table having some 50 million records. The table initially had 50 columns. The table has no indexes. When I execute the "sp\_spaceused" procedure I get "24733.88 MB" as result. Now to reduce the size of this database, I remove 15 columns (mostly int columns) and run the "sp\_spaceused", I still get "24733.88 MB" as result. 

Why is the database size not reducing after removing so many columns? Am I missing anything here?

**Edit:** I have tried database shrinking but it didn't help either

Answer: 
Try running the following command:

```
DBCC CLEANTABLE ('dbname', 'yourTable', 0)

```

It will free space from dropped variable-length columns in tables or indexed views. More information here [DBCC CLEANTABLE](http://msdn.microsoft.com/en-us/library/ms174418.aspx) and here [Space used does not get changed after dropping a column](http://www.sqldbadiaries.com/2011/03/03/space-used-does-not-get-changed-after-dropping-a-column/)

Also, as correctly pointed out on the link posted on the first comment to this answer. After you've executed the DBCC CLEANTABLE command, you need to REBUILD your clustered index in case the table has one, in order to get back the space.

```
ALTER INDEX IndexName ON YourTable REBUILD

```
When any variable length column is dropped from table, it does not reduce the size of table. Table size stays the same till Indexes are reorganized or rebuild. 

There is also DBCC command DBCC CLEANTABLE, which can be used to reclaim any space previously occupied with variable length columns. Here is the syntax:

```
DBCC CLEANTABLE ('MyDatabase','MySchema.MyTable', 0)WITH NO_INFOMSGS;
GO

```

Raj