title: Creating table to specify compression option
body: <p>I am using this hard-to-understood syntax (sorry I am new to Sql server :))</p>
  
  <pre><code>CREATE TABLE   
      [ database_name . [ schema_name ] . | schema_name . ] table_name   
      [ AS FileTable ]  
      ( {   &lt;column_definition&gt;   
          | &lt;computed_column_definition&gt;    
          | &lt;column_set_definition&gt;   
          | [ &lt;table_constraint&gt; ]   
          | [ &lt;table_index&gt; ] }  
            [ ,...n ]    
            [ PERIOD FOR SYSTEM_TIME ( system_start_time_column_name   
               , system_end_time_column_name ) ]  
        )  
      [ ON { partition_scheme_name ( partition_column_name )   
             | filegroup   
             | "default" } ]   
      [ TEXTIMAGE_ON { filegroup | "default" } ]   
      [ FILESTREAM_ON { partition_scheme_name   
             | filegroup   
             | "default" } ]  
      [ WITH ( &lt;table_option&gt; [ ,...n ] ) ]  
  [ ; ]  
  </code></pre>
  
  <p>and the table option I would want to ask is</p>
  
  <pre><code>&lt;table_option&gt; ::=  
  {  
      [DATA_COMPRESSION = { NONE | ROW | PAGE }  
        [ ON PARTITIONS ( { &lt;partition_number_expression&gt; | &lt;range&gt; }   
        [ , ...n ] ) ]]  
  .....
  </code></pre>
  
  <p>How does it mean I can format my T-Sql script  ?</p>
  
  <p>For example,</p>
  
  <pre><code>CREATE TABLE Black_Cowgirl_tb
  ([name] int not null, [location] varchar(50) not null, [SheCanCook] bit not null, [SheCanRideAHorse] bit not null,... ) WITH 
  (
  DATA_COMPRESSION = NONE ON PARTITIONS (1), 
  DATA_COMPRESSION = ROW ON PARTITIONS (2, 4, 6 TO 8), 
  DATA_COMPRESSION = PAGE ON PARTITIONS (3, 5)
  )
  </code></pre>
  
  <p>Would you please enlist all possible ways to format this with data compression option ? I'd like to learn a lot but never could I have a chance. Thanks.  </p>