title: Sql 2016 Always Encrypted - Join operation with Encrypted and Non Encrypted column?
body: <p>How to perform Join operation with Encrypted and Non Encrypted Column in Sql server 2016. Im using .net framework 4.6.1. Column Encryption Setting = Enabled in Connection string.</p>
  
  <p>Code : </p>
  
  <pre><code>cmd = new SqlCommand("select determin.name as name from determin inner join determinjoin on determin.name = determinjoin.name ", con); 
  </code></pre>
  
  <p>Error :</p>
  
  <pre><code>    The data types varchar(20) encrypted with (encryption_type = 
  'DETERMINISTIC', encryption_algorithm_name = 
  'AEAD_AES_256_CBC_HMAC_SHA_256', column_encryption_key_name = 'CEK_Auto4', 
  column_encryption_key_database_name = 'depdb') collation_name = 
  'Latin1_General_BIN2' and varchar are incompatible in the equal to operator.
  </code></pre>