Encrypt Database Columns
Database columns can be encrypted with PowerShell- or SSMS-generated keys.
Encrypt Database Column with PowerShell-Generated Keys
Encrypt Database Column with SSMS-generated Keys
To use the CMK and CEK that were generated in Use SSMS to Generate the CMK and CEK follow the instructions above for encrypting a database column with PowerShell-generated keys (Encrypt Database Column with PowerShell-generated Keys), but select a different column (for example, Address) and use the column encryption key CEK-YubiHSM-SSMS and the related column master key CMK-YubiHSM-SSMS.
Verify Encrypted Database Column
To check that the columns have been encrypted, expand the object Database > Database-Name (in our example the database name is Sales3
). Then select New Query in the top menu. Type the SQL query in the example below and click Execute.
SELECT * FROM Table_Customers;

Figure – Checking the encrypted columns