Skip to content

Latest commit

 

History

History
64 lines (50 loc) · 2.43 KB

File metadata and controls

64 lines (50 loc) · 2.43 KB
title DROP COLUMN ENCRYPTION KEY (Transact-SQL)
description DROP COLUMN ENCRYPTION KEY (Transact-SQL)
author jaszymas
ms.author jaszymas
ms.date 10/15/2019
ms.service sql
ms.subservice t-sql
ms.topic reference
f1_keywords
DROP COLUMN ENCRYPTION
DROP COLUMN ENCRYPTION KEY
DROP_COLUMN_ENCRYPTION_TSQL
DROP_COLUMN_ENCRYPTION_KEY_TSQL
helpviewer_keywords
DROP COLUMN ENCRYPTION KEY statement
column encryption key, drop
dev_langs
TSQL

DROP COLUMN ENCRYPTION KEY (Transact-SQL)

[!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

Syntax

DROP COLUMN ENCRYPTION KEY key_name [;]  

Arguments

key_name
Is the name by which the column encryption key to be dropped from the database.

Remarks

A column encryption key cannot be dropped if it is used to encrypt any column in the database. All columns using the column encryption key must first be dropped.

Permissions

Requires ALTER ANY COLUMN ENCRYPTION KEY permission on the database.

Examples

A. Dropping a column encryption key

The following example drops a column encryption key called MyCEK.

DROP COLUMN ENCRYPTION KEY MyCEK;  
GO  

See Also

CREATE COLUMN ENCRYPTION KEY (Transact-SQL)
ALTER COLUMN ENCRYPTION KEY (Transact-SQL)
CREATE COLUMN MASTER KEY (Transact-SQL)
Always Encrypted
Always Encrypted with secure enclaves
Overview of Key Management for Always Encrypted
Manage keys for Always Encrypted with secure enclaves