DECLARE @SSNPattern CHAR(11) = '%9838'
SELECT * FROM [dbo].[Employees] WHERE [SSN] LIKE @SSNPattern
ALTER TABLE ALTER COLUMNT-SQL statements and do not require special client-side tools. Here is an example of a statement that triggers a rotation of a column encryption key:
--Assuming SSN is a plaintext column, the below statement encrypts data in the column.
ALTER TABLE [dbo].[Employees]
ALTER COLUMN [SSN] [char](11)
ENCRYPTED WITH (COLUMN_ENCRYPTION_KEY = [CEK1], ENCRYPTION_TYPE = Randomized, ALGORITHM = 'AEAD_AES_256_CBC_HMAC_SHA_256') NOT NULL
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.