Microsoft SQL Server offers two flavors of table compression: row compression and page compression.
To turn on the table compression, execute the following set of statements:
ALTER TABLE [table name]
REBUILD WITH (DATA_COMPRESSION = PAGE)
You may also call a system stored procedure to caculate space saved by the compression as below:
EXEC sp_estimate_data_compression_savings 'dbo', [table name], NULL, NULL, 'PAGE'
For more information, click here.