Skip to main content
Scalar function
Returns NULL when any argument is NULL.

Syntax

Scalar

Arguments

Returns

  • Type: STRING
  • Possible values: The selected part, or an empty string when the part is out of range.
  • NULL behavior: Returns NULL when any argument is NULL.

Properties

Usage notes

  • An empty delimiter treats the whole input as one part.
  • For a nonempty delimiter, a zero part number is treated as the first part only in the Snowflake branch; it raises an error in other dialects. With an empty delimiter, zero raises an error in every branch.

Examples

Typical behavior

Empty fields and a missing field

In the result table, '' denotes an empty string.
Last modified on October 15, 2026