
Answer-first summary for fast verification
Answer: VOLATILE
The VOLATILE clause in Snowflake is used to define a function that may return different values for different rows, even when called with the same input parameters. This is appropriate for functions that depend on external factors, session variables, or random number generation. The IMMUTABLE clause is for functions that always return the same result for the same inputs, RETURNS specifies the data type of the return value, and COMMENT is for adding descriptive text to the function definition. The community discussion shows 100% consensus on answer D, with a reference to Snowflake documentation confirming that VOLATILE is the correct clause for this scenario.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.