| title | DROP COLUMN ENCRYPTION KEY (Transact-SQL) | ||||
|---|---|---|---|---|---|
| description | DROP COLUMN ENCRYPTION KEY (Transact-SQL) | ||||
| author | jaszymas | ||||
| ms.author | jaszymas | ||||
| ms.date | 01/30/2026 | ||||
| ms.service | sql | ||||
| ms.subservice | t-sql | ||||
| ms.topic | reference | ||||
| f1_keywords |
|
||||
| helpviewer_keywords |
|
||||
| dev_langs |
|
[!INCLUDE sqlserver2016-asdb-asdbmi]
Drops a column encryption key from a database.
:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: Transact-SQL syntax conventions
DROP COLUMN ENCRYPTION KEY key_name [;]
key_name
The name of the column encryption key to drop from the database.
A column encryption key can't be dropped if it's used to encrypt any column in the database. All columns using the column encryption key must first be decrypted or dropped.
To remove encryption from a column:
-
Decrypt the column - Use
ALTER TABLEto modify the encrypted column, removing the encryption specification:ALTER TABLE dbo.Employees ALTER COLUMN SSN NVARCHAR(11);
-
Drop the column encryption key - After all columns using the key are decrypted, you can drop the key:
DROP COLUMN ENCRYPTION KEY MyCEK;
Alternatively, if you no longer need the column data, you can drop the column entirely using ALTER TABLE DROP COLUMN before dropping the encryption key.
Requires ALTER ANY COLUMN ENCRYPTION KEY permission on the database.
The following example drops a column encryption key called MyCEK.
DROP COLUMN ENCRYPTION KEY MyCEK;
GO