COF-C02 · Question #250
A tabular User-Defined Function (UDF) is defined by specifying a return clause that contains which keyword?
The correct answer is B. TABLE. A tabular UDF (also called a table function) returns a set of rows rather than a single scalar value. In Snowflake SQL, the RETURNS clause for a tabular UDF uses the TABLE keyword followed by the column definitions that describe the returned row structure (e.g., RETURNS TABLE…
Question
A tabular User-Defined Function (UDF) is defined by specifying a return clause that contains which keyword?
Options
- AROW_NUMBER
- BTABLE
- CTABULAR
- DVALUES
How the community answered
(29 responses)- B97% (28)
- D3% (1)
Explanation
A tabular UDF (also called a table function) returns a set of rows rather than a single scalar value. In Snowflake SQL, the RETURNS clause for a tabular UDF uses the TABLE keyword followed by the column definitions that describe the returned row structure (e.g., RETURNS TABLE (col1 INT, col2 VARCHAR)). This distinguishes it from a scalar UDF, which returns a single value.
Topics
Community Discussion
No community discussion yet for this question.