DROP ROW ACCESS POLICY¶
Removes a row access policy from the system.
- See also:
In this Topic:
DROP ROW ACCESS POLICY [ IF EXISTS ] <name>;
Identifier for the row access policy; must be unique for your account.
The identifier value must start with an alphabetic character and cannot contain spaces or special characters unless the entire identifier string is enclosed in double quotes (e.g.
"My object"). Identifiers enclosed in double quotes are also case-sensitive.
For more details, see Identifier Requirements.
Dropping a row access policy requires either the OWNERSHIP privilege on the policy or the OWNERSHIP privilege on the schema in which the row access policy is added.
Prior to dropping a row access policy, execute the following statement to determine if the row access policy is applied to any tables or views. For more information, see POLICY_REFERENCES.
SELECT * from table(information_schema.policy_references(policy_name=>'<string>'));
A row access policy cannot be dropped successfully if it is currently attached to a resource. Before executing a DROP statement, detach the row access policy from the table or view with an ALTER TABLE or ALTER VIEW statement as shown in ALTER TABLE or ALTER VIEW.
Snowflake does not support
UNDROPwith row access policy objects. Using
UNDROPtriggers an error message. For more information on this error message, see Troubleshooting Row Access Policies.
If a table column has a row access policy attached to it, the column cannot be dropped from the table.
The following example drops a row access policy from a table.
drop row access policy rap_table_employee_info;