nerdexam
Snowflake

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…

Data Transformations

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)
  • B
    97% (28)
  • D
    3% (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

#User-Defined Functions (UDFs)#Tabular UDFs (UDTFs)#SQL Syntax#CREATE FUNCTION

Community Discussion

No community discussion yet for this question.

Full COF-C02 Practice