如何在 Sql server 2016 中使用加密和非加密列执行联接操作。我使用 .net 框架 4.6.1。列加密设置 = 在连接字符串中启用。
代码 :
cmd = new SqlCommand("select determin.name as name from determin inner join determinjoin on determin.name = determinjoin.name ", con);
错误 :
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.