In SQL Server we have two types of compression :
Let's look at it more deeply.
For create table with row or page compression we need to do it in this way :
1
2 | create table testPageCompression (col1 varchar(max), col2 varchar(max))
with (data_compression = row)
|
1
2 | create table testPageCompression (col1 varchar(max), col2 varchar(max))
with (data_compression = page)
|
It possible to check if it working just looking into properties window by table:
Also we can compress heap, clustered index, non clustered index, indexed view , partitions of tables in partitioned table , file stream objects and backup files.