SnowPro Core Certification — Question 1246

Which clause is used to define a function that may return different values for different rows?

Answer options

Correct answer: D

Explanation

The VOLATILE clause indicates that the function can return different results even when called with the same input, which is necessary for functions that depend on external factors or mutable data. The IMMUTABLE clause, in contrast, specifies that the function will always return the same result for the same inputs, while RETURNS simply defines the return type of the function. COMMENT is used for adding documentation and does not affect the function's behavior.