Skip to content

Latest commit

 

History

History
75 lines (52 loc) · 2.5 KB

File metadata and controls

75 lines (52 loc) · 2.5 KB
title DROP SECURITY POLICY (Transact-SQL)
description DROP SECURITY POLICY a security policy for use with row-level security.
author VanMSFT
ms.author vanto
ms.date 10/04/2023
ms.service sql
ms.subservice t-sql
ms.topic reference
ms.custom
ignite-2025
f1_keywords
DROP_SECURITY_POLICY_TSQL
DROP SECURITY POLICY
DROP SECURITY
DROP_SECURITY_TSQL
helpviewer_keywords
DROP SECURITY POLICY statement
dev_langs
TSQL
monikerRange =azuresqldb-current || >=sql-server-2016 || >=sql-server-linux-2017 || =azuresqldb-mi-current || =fabric || =fabric-sqldb

DROP SECURITY POLICY (Transact-SQL)

[!INCLUDE sqlserver2016-asdb-asdbmi-fabricse-fabricdw-fabricsqldb]

Deletes a security policy.

:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: Transact-SQL syntax conventions

Syntax

DROP SECURITY POLICY [ IF EXISTS ] [schema_name. ] security_policy_name    
[;]  

Arguments

IF EXISTS

Applies to: [!INCLUDE ssNoVersion] ( [!INCLUDE sssql16-md] through current version).

Conditionally drops the security policy only if it already exists.

schema_name

Is the name of the schema to which the security policy belongs.

security_policy_name

The name of the security policy. Security policy names must comply with the rules for identifiers and must be unique within the database and to its schema.

Remarks

Permissions

Requires the ALTER ANY SECURITY POLICY permission and ALTER permission on the schema.

Examples

DROP SECURITY POLICY secPolicy;  

Related content