DBCC CLEANTABLE reclaims table space after a column is dropped from the database using the ALTER TABLE DROP COLUMN statement. DBCC CLEANTABLE works for variable-length columns only. Variable-length columns are columns of type varchar, text, nvarchar, ntext, varbinary, and image.
Beekeeper Studio Is A Free & Open Source Database GUI
Best SQL query & editor tool I have ever used. It provides everything I need to manage my database. - ⭐⭐⭐⭐⭐ Mit
Beekeeper Studio is fast, intuitive, and easy to use. Beekeeper supports loads of databases, and works great on Windows, Mac and Linux.
Syntax
DBCC CLEANTABLE ('MyDatabase', 'MyTable')
You need sysadmin or db_owner privileges to run DBCC CLEANTABLE.