Skip to content

Latest commit

 

History

History
72 lines (50 loc) · 2.42 KB

drop-security-policy-transact-sql.md

File metadata and controls

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

DROP SECURITY POLICY (Transact-SQL)

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

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