
Answer-first summary for fast verification
Answer: SET MASKING POLICY
The question asks which command is used to apply a previously created masking policy in Snowflake. According to Snowflake documentation and the community discussion with the most upvotes, the correct command is SET MASKING POLICY within an ALTER TABLE or ALTER VIEW statement. Specifically, the syntax is ALTER TABLE table_name MODIFY COLUMN column_name SET MASKING POLICY policy_name. Option D (SET MASKING POLICY) directly represents this syntax. Option A (ALTER MASKING POLICY) is incorrect as it modifies the policy definition itself, not its application to a column. Option B (APPLY MASKING POLICY) is a privilege granted to roles to allow them to apply policies, not a command. Option C (CREATE MASKING POLICY) is for creating a new policy, not applying an existing one. The community discussion shows strong consensus for D, with multiple comments citing official documentation and upvoted examples.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.