適用於:SQL ServerAzure
SQL Managed InstanceAzure Synapse
AnalyticsSQL
資料庫 in Microsoft Fabric
從目前資料庫移除主要金鑰。
Syntax
DROP MASTER KEY
Arguments
這個陳述式沒有引數。
Remarks
如果資料庫中有任何受主要金鑰保護的私密金鑰,卸除作業便會失敗。
Permissions
需要資料庫的 CONTROL 權限。
Examples
下列範例會移除 AdventureWorks2025 資料庫的主要金鑰。
USE AdventureWorks2022;
DROP MASTER KEY;
GO
範例:Azure Synapse Analytics
下列範例會移除主要金鑰。
USE master;
DROP MASTER KEY;
GO