title: sql server query partitioned table
body: <p>Is there a way to get all the rows of a table's partition using the partition key column and not the partition number?</p>
  
  <pre><code>select * from partitioned_table
  where $partition.fpartfunction(key_column) = 1
  </code></pre>
  
  <p>As far as i know the above returns all rows in partition 1. I wonder if i could do something similar like this:</p>
  
  <p>PSEUDO CODE :</p>
  
  <pre><code>select * from partitioned_table
      where $partition.get_me_all_rows_in_partition_with_Keycolumn_year = '2019' 
  </code></pre>